? Success

User tests: Successful: Unsuccessful:

avatar demis-palma
demis-palma
10 Jul 2016

Testing Instructions

  1. In the back-end, create a module for the front-end side. The module type doesn't matter. Give it a name, for example "My Module".
  2. Duplicate it with the "Duplicate" button in the top toolbar. The new module is automatically named "My Module (2)". Leave its name as is.
  3. On both modules, ensure that the "Position" is "unset", or set it to a non-existing template position: we want to load the module through the content-loadmodule plugin, not through a standard template position. In addition ensure that the "Status" is "Published", and "Menu Assignment" to "All pages". These conditions are necessary for the content-loadmodule to load the module.
  4. Create an article. Within its content load the module using the content-loadmodule plugin. To avoid struggling with the correct syntax, you can use the "Module" editor button introduced recently. There select "My Module (2)" from the list by the green button, which corresponds to {loadmodule}. Do not use the yellow button, which would correspond to {loadposition}.
  5. Take a look to your module in the front-end. I created a Menu Item of type "Articles » Single Article" for that purpose, but browsing your article through a blog view should make no difference.
  6. You should see that the plugin code has not been replaced with the actual module. The plugin seems not working at all.

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.

avatar demis-palma demis-palma - open - 10 Jul 2016
avatar demis-palma demis-palma - change - 10 Jul 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Jul 2016
Labels Added: ?
avatar demis-palma demis-palma - change - 10 Jul 2016
Title
Fixed Loadmodule parenthesis in title
Loadmodule plugin refuses to load copied modules
avatar demis-palma demis-palma - change - 10 Jul 2016
Title
Fixed Loadmodule parenthesis in title
Loadmodule plugin refuses to load copied modules
avatar chrisdavenport
chrisdavenport - comment - 10 Jul 2016

Well spotted. Regular expressions can be rather slow so I agree that str_replace would be preferable.

avatar RonakParmar
RonakParmar - comment - 11 Jul 2016

I have follow above steps and not able to re-produce this issue in latest staging branch.
Joomla! Version: Joomla! 3.6.0-rc Release Candidate [ Noether ] 28-June-2016 20:34 GMT

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.

avatar killoltailored
killoltailored - comment - 11 Jul 2016

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.

avatar RonakParmar
RonakParmar - comment - 11 Jul 2016

I have used code to load the module in article which was "{loadmodule mod_articles_archive}".
I have noticed that it was loading original module not the copied module both module name were same in database "mod_articles_archive" so, not able to load copied module. If we used title of module then it was not replaced at front site, it was simple test for article.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11065.

avatar RonakParmar RonakParmar - test_item - 11 Jul 2016 - Tested successfully
avatar RonakParmar
RonakParmar - comment - 11 Jul 2016

I have tested this item successfully on bda657a

After using the "Module" button it works fine.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11065.

avatar killoltailored killoltailored - test_item - 11 Jul 2016 - Tested successfully
avatar killoltailored
killoltailored - comment - 11 Jul 2016

I have tested this item successfully on bda657a

I have tested successfully
After use of "Module" button


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11065.

avatar gunjanpatel gunjanpatel - change - 11 Jul 2016
Status Pending Ready to Commit
avatar gunjanpatel
gunjanpatel - comment - 11 Jul 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11065.

avatar joomla-cms-bot joomla-cms-bot - change - 11 Jul 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 11 Jul 2016
Milestone Added:
avatar roland-d roland-d - close - 16 Jul 2016
avatar roland-d roland-d - merge - 16 Jul 2016
avatar joomla-cms-bot joomla-cms-bot - close - 16 Jul 2016
avatar roland-d roland-d - change - 16 Jul 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-07-16 13:27:03
Closed_By roland-d
avatar joomla-cms-bot joomla-cms-bot - change - 16 Jul 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment