Create a custom module and name it something with a white space in the end, like "Something ". Then go inside an article and load a module from the button "Load module", and select the "Something " module.
The module is loaded in the article
Nothing shows up
Joomla 3.8.2 with nothing installed except the core
The problem is caused by the white space:
I think it's important to fix because with copy/paste of the module name is easy to get a whitespace in the end of the name.
Labels |
Added:
?
|
Status | New | ⇒ | Confirmed |
Category | ⇒ | com_content com_modules |
I guess the only way to solve this is preventing a module Title do be saved with whitespaces.
Patch is easy to do, but it may not be B/C.
diff --git a/administrator/components/com_modules/models/module.php b/administrator/components/com_modules/models/module.php
index 206cac8..8458163 100644
--- a/administrator/components/com_modules/models/module.php
+++ b/administrator/components/com_modules/models/module.php
@@ -919,4 +919,6 @@
}
+ $data['title'] = JFilterInput::getInstance()->clean($data['title'], 'TRIM');
+
// Alter the title and published state for Save as Copy
if ($input->get('task') == 'save2copy')
I doubt it would be b/c if you can currently save a module title with trailing spaces. you never know what a user might do.
The only solution I can see, is for the loadmodule to allow white spaces, if you trim the module title now it would be a B/C since users may have been using white space, I know very unlikely but still...
@tonypartridge do you think you clouod take a look at this one as well - please
Ok Ok, so I can make it work with spaces but can see why it's done as it is.
I suggest we leave as is because of the BC and apply @infograf768 patch to J4.
Status | Confirmed | ⇒ | Information Required |
Status | Information Required | ⇒ | Discussion |
Title |
|
Is this issue still dramatically relevant for Joomla 3? The module button now inserts {loadmoduleid 123}
when you click on the title of the module but not the title.
Status | Discussion | ⇒ | Information Required |
can be closed indeed
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-04-19 14:28:00 |
Closed_By | ⇒ | franz-wohlkoenig |
Issue confirmed.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18664.