? ? Success

User tests: Successful: Unsuccessful:

avatar SharkyKZ
SharkyKZ
7 Sep 2018

Pull Request for Issue #21329.

Summary of Changes

This is an alternative to Rosie-Eagle#1 and #21948.

This fixes the issue of module positions and modules with titles containing special regular expression characters not being loaded.

Testing Instructions

Note, the use of } hasn't been fixed.

Copied from #21329 by franz-wohlkoenig:

  1. Log in at the backend of joomla
  2. Go to menu "Extensions > Modules".
  3. Create a "Custom" module.
  4. Give field 'title' the following value (without the quotes): "Some math: 1 + 1 = 2"
  5. Save the module.
  6. Next create a new article (or edit an existing one).
  7. Make sure you can later view the article at the fronted of joomla, where visitors normally view the article.
  8. Enter load module shortcode with your module type and title, e.g. {loadmodule mod_custom, Some math: 1 + 1 = 2}
  9. Save the article.
  10. View the article at the frontend of joomla.

Notice "{loadmodule mod_custom, Some math: 1 + 1 = 2}" not beeing replaced by the actual rendering of the module you created at steps 3 to 5. The text "{loadmodule mod_custom, Some math: 1 + 1 = 2}" is still there as if it were untouched.

Documentation Changes Required

No.

avatar SharkyKZ SharkyKZ - open - 7 Sep 2018
avatar SharkyKZ SharkyKZ - change - 7 Sep 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Sep 2018
Category Front End Plugins
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Apr 2019
Title
[plg_content_loadmodule] Prevent issues with regular expression characters
Prevent issues with regular expression characters
avatar franz-wohlkoenig franz-wohlkoenig - edited - 19 Apr 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Apr 2019
The description was changed
avatar franz-wohlkoenig franz-wohlkoenig - edited - 26 Apr 2019
avatar SharkyKZ SharkyKZ - change - 30 May 2019
Labels Removed: J3 Issue
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 20 Jul 2019

I have tested this item ? unsuccessfully on 61ff38b

Module isn't rendered also by using this PR.

Note: Append a Module by click on "Module"-Button load it by ID, so this Problem didn't exist.


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 20 Jul 2019 - Tested unsuccessfully
avatar SharkyKZ
SharkyKZ - comment - 5 Aug 2019

There's an error in testing instructions. The shortcode should contain module name, not just title. So, for example, {loadmodule Some math: 1 + 1 = 2} should become {loadmodule mod_login,Some math: 1 + 1 = 2}.

avatar SharkyKZ SharkyKZ - change - 5 Aug 2019
The description was changed
avatar SharkyKZ SharkyKZ - edited - 5 Aug 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Aug 2019

I have tested this item successfully on a30e151


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 6 Aug 2019 - Tested successfully
avatar HLeithner
HLeithner - comment - 6 Aug 2019

wouldn't it be easier to use preg_quote?

avatar SharkyKZ
SharkyKZ - comment - 7 Aug 2019

This was meant to be faster but now I'm wondering whether we need to use utf8 string functions from Joomla\String\StringHelper here.

avatar SharkyKZ SharkyKZ - change - 12 Oct 2019
Title
Prevent issues with regular expression characters
[plg_content_loadmodule] Prevent issues with regular expression characters
avatar SharkyKZ SharkyKZ - edited - 12 Oct 2019
avatar SharkyKZ
SharkyKZ - comment - 12 Oct 2019

No need to use utf8 functions. Works fine like this.

avatar jwaisner jwaisner - test_item - 14 Jan 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 14 Jan 2020

I have tested this item successfully on c6c07d6


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

avatar jwaisner
jwaisner - comment - 14 Jan 2020

@franz-wohlkoenig Please test latest commit.


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

avatar SharkyKZ SharkyKZ - change - 14 Jan 2020
Status Pending Ready to Commit
avatar SharkyKZ
SharkyKZ - comment - 14 Jan 2020

RTC as previous test still good (latest commits include only branch updates).


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

avatar HLeithner HLeithner - close - 22 Jan 2020
avatar HLeithner HLeithner - merge - 22 Jan 2020
avatar HLeithner HLeithner - change - 22 Jan 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-01-22 21:47:27
Closed_By HLeithner
Labels Added: ?
avatar HLeithner
HLeithner - comment - 22 Jan 2020

Thanks

Add a Comment

Login with GitHub to post a comment