User tests: Successful: Unsuccessful:
I just noticed that error log on one of my sites quickly grew to over 100 MB. It was always the same error:
Trying to get property of non-object in /*******/public_html/libraries/cms/component/router/rules/menu.php on line 179.
I was not the only one with this problem, here is a related post on the forum: https://forum.joomla.org/viewtopic.php?t=949743
It would happen for example if when migrating from an old version you had a menu of type "Content Section", and it wouldn't matter that the menu isn't displayed anywhere on the new version. It may happen under some other circumstances as well. The change I made should keep the condition of the if statement unchanged, except that it won't throw an error if the variable is uninitialized.
Pull Request for Issue # .
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
Status | Pending | ⇒ | Needs Review |
IMO the fix should look like
diff --git a/libraries/src/Component/Router/Rules/MenuRules.php b/libraries/src/Component/Router/Rules/MenuRules.php
index 34bd9b1e58..973d01095c 100644
--- a/libraries/src/Component/Router/Rules/MenuRules.php
+++ b/libraries/src/Component/Router/Rules/MenuRules.php
@@ -202,7 +202,7 @@ class MenuRules implements RulesInterface
foreach ($items as $item)
{
- if (isset($item->query) && isset($item->query['view']))
+ if (isset($item->query['view'], $views[$item->query['view']]))
{
$view = $item->query['view'];
because such view does not exist and can not be added to menu lookup at all.
Any updates on how long it will be till this 8 chars, 3½ month old fix will be implemented ? I hope the time isn't proportional to the size of the commit for other problems.
Every pull request needs at least two human tests to confirm the issue and fix
Yay one more solution \o/
@johannesveje If you want any changes in joomla you should test some of them at https://issues.joomla.org/tracker/joomla-cms/
I'll create a solution myself when I get the time
Rel_Number | 0 | ⇒ | 18564 |
Relation Type | ⇒ | Not before |
Status | Needs Review | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-11-15 16:20:22 |
Closed_By | ⇒ | franz-wohlkoenig |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/17323
Closed_Date | 2017-11-15 16:20:22 | ⇒ | 2017-11-15 16:20:23 |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
closed as stated above.
Status is set on "Needs Review".