User tests: Successful: Unsuccessful:
Pull Request for Issue # .
#30812
$app->getMenu()->getActive();
can return a MenuItem or null
by calling a function when null is returned, it generates a fatal error.
Add a dummy/non existent ItemId in your non sef urls.
E.g. /index.php?option=com_content&view=article&id=2:another-article&catid=9&itemId=5000
In that case there is no menu item with id 5000
No fatal error
No
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Templates (site) |
Labels |
Added:
?
|
@sakiss Please revert your change in error.php. It was good like it was before, using the ternary expression, and you now introduced an error with undefined $pageclass when there is no menu item. And as @SharkyKZ suggested please change index.php so it uses the same ternary expression as error.php does without your change.
@sakiss And in addition to the above comment, please update the branch of this PR to the latest 4.0-dev branch of the CMS repository, not of your fork. It seems your 4.0-dev branch was very outdated when you have created this PR and the other one, #31099 based on it, because both PRs fail in our automated test due to outdated testing configuration from before February.
Let me know if you need help with.
Thanks in advance.
Added the "Updates Requested" label so it's clear for testers that this PR needs changes as specified in review comments above.
Labels |
Added:
?
|
Category | Front End Templates (site) | ⇒ | Unit Tests Repository Administration |
I am closing this due to conflicts. Will open a new one.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-10-16 17:58:25 |
Closed_By | ⇒ | sakiss | |
Labels |
Added:
?
|
Can you do it the same as in
error.php
?joomla-cms/templates/cassiopeia/error.php
Lines 28 to 29 in f4b2644
Otherwise
$pageclass
is undefined when no menu item.