-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IBX-6312: Fixed ParentContentType View Matcher for not available parent #438
base: 4.6
Are you sure you want to change the base?
IBX-6312: Fixed ParentContentType View Matcher for not available parent #438
Conversation
b0c081d
to
64aedb4
Compare
$this->controllerChecker | ||
$this->controllerChecker, | ||
false, | ||
null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Ideally, logger calls should be checked (via Mock expectations). Missing log information would be an issue for a developer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9bd5144
to
3d8c612
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA approved on IbexaDXP 4.6 commerce.
Co-authored-by: Paweł Niedzielski <pawel.niedzielski@ibexa.co>
…ption if parent is not available - Added test of logging
3d8c612
to
f7437ad
Compare
Quality Gate passedIssues Measures |
- | ||
message: "#^Cannot call method warning\\(\\) on Psr\\\\Log\\\\LoggerInterface\\|null\\.$#" | ||
count: 3 | ||
path: src/lib/MVC/Symfony/Controller/Content/PreviewController.php | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an issue that needs to be resolved, not added to the baseline, please.
@vidarl Could you please rebase PR? CI has been fixed on base branch. |
v3.3
This is a rebase of ezsystems/ezplatform-kernel#383 made for 3.3. But 3.3 is now out-of-maintenance
Description:
When matcher is checking parent's contenttype, it might throw NotFoundException if the parent is not available ( for instance if it is not available in any languages configured in the current siteaccess). I don't think the matcher should throw an exception in this case, just simply return false.
In dev, this NotFoundException will be shown to the user, while this will be handled by
Ibexa\Bundle\Core\EventListener\ExceptionListener
and a non-explaining 500 will be shown:The change have no functional change on the front-end site access. User will anyway be given a 404 ( but the NotFound exception is no longer originating from the matcher). However, in admin-ui there is a big difference. A Landing page is not editable in admin-ui without the fix because the preview will be rendered with the front-end siteaccess scope and the matcher will then throw the exception
With this fix, user will see this in prod:
In dev, the preview controller will throw a BadState exception and look like this:
For QA:
See instructions in ticket for how to reproduce
Documentation:
No doc needed