-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Loadmodule plugin refuses to load copied modules #11065
Conversation
Well spotted. Regular expressions can be rather slow so I agree that str_replace would be preferable. |
I have follow above steps and not able to re-produce this issue in latest staging branch. With PR and without PR the module is being loaded fine in my article at front end site. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11065. |
I have follow your testing instructions but not able to reproduce this issue in latest version of Joomla with applied patch and without applying patch. Joomla! Version : Joomla! 3.6.0-rc Release Candidate [ Noether ] 28-June-2016 20:34 GMT This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11065. |
I have used code to load the module in article which was "{loadmodule mod_articles_archive}". This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11065. |
I have tested this item ✅ successfully on bda657a This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11065. |
I have tested this item ✅ successfully on bda657a This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11065. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11065. |
Testing Instructions
Summary of Changes
The problem is that loadmodule calls preg_replace using a literal string as pattern, while in a regular expression the parenthesis are metacharacters and must be escaped.
Frankly, I would suggest to change preg_replace with str_replace, but I've just escaped the parenthesis to fix this bug without opening a debate.