Updated from 3.7.0. to 3.7.1
Turn SEF off in Joomla config. Although in admin menu items edit pages the menu item url is set correctly with &. In the front end & are replaced with &
breaking the variables and Itemid value, breaking modules affectations.
index.php?option=com_content&view=categories&id=50&Itemid=288
index.php?option=com_content&view=categories&id=50& amp;Itemid=288
PHP Version 7.0.18
Observed on 4 sites hosted on 2 different servers
No the space is only here (in this topic) so the & amp; is not displayed here as a single &. I should have used code tags.
I get
index.php?option=com_content&view=categories&id=50&Itemid=288
instead of
index.php?option=com_content&view=categories&id=50&Itemid=288
Priority | Urgent | ⇒ | Medium |
Status | New | ⇒ | Discussion |
There were changes to ampReplace in Joomla 3.7.1
try removing htmlspecialchars
in the modules/mod_menu/tmpl/default_component.php file on line 52 to make that line:
echo JHtml::_('link', JFilterOutput::ampReplace($item->flink), $linktype, $attributes);
that fixes the issue I think
Give us a unit test case on the repo to work with then. joomla-framework/filter#22 didn't break the lone test case so if it can be proven that change broke it that will help us to fix it.
Give us a unit test case on the repo to work with then
Actually if you check I did actually contrib several more tests on this exact merge!
Im unclear what the exact problem is here, but the framework change broke joomla, but im not sure if thats cause joomla code was crap and the framework was not...
After being shot down repeatedly by certain senior project member telling me that unit tests are ******* Im in no rush to get out of bed and write more
Im thinking this is joomla, not the new ampReplace, as the input to the ampReplace method is:
index.php?option=com_content&view=article&id=1&Itemid=101
which is clearly wrong, so my suggestion here is probably right
Note to self, merge additional tests up...
I confirm that, as stated PhilETaylor, removing the htmlspecialchars from
modules/mod_menu/tmpl/default_component.php
and
modules/mod_menu/tmpl/default_url.php (for non absolut external url links)
fixes the issue.
Problem is also solved by simply undoing the change to OutputFilter::ampreplace
preg_replace parameters look wrong
Problem is also solved by simply undoing the change to OutputFilter::ampreplace
No that is the incorrect way forward. A step back.
The preg_replace is fine.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-05-18 05:16:58 |
Closed_By | ⇒ | franz-wohlkoenig |
Status | Closed | ⇒ | Discussion |
Status | Discussion | ⇒ | Closed |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/16088
closed as having PR #16089
Tested using PHP 7.0.19 and do see the replacement but without the spacing you have.
Getting URLs like index.php?option=com_content&view=article&id=8&Itemid=116 which works.
Looks like & is kept in modules for example latest articles which doesnt replace & with & in the Url generated.