-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.0] J4 Modules should require an element field #33182
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
[4.0] J4 Modules should require an element field #33182
The head ref may contain hidden characters: "\u2014fix-module-install\u20144.0-dev"
Conversation
|
BTW this should be a release blocker |
This comment was marked as abuse.
This comment was marked as abuse.
|
Thanks @PhilETaylor code updated |
|
I have tested this item ✅ successfully on fbe603a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33182. |
|
I have tested this item ✅ successfully on fbe603a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33182. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33182. |
|
Thanks! |
Pull Request for Issue # .
Summary of Changes
Since #32633 J4 (non legacy) Modules don't have a
module.phpfile in their root folderjoomla-cms/administrator/modules/mod_quickicon/mod_quickicon.xml
Line 14 in 2c30264
and thus it's impossible to install a module that uses namespace, check the existing code:
joomla-cms/libraries/src/Installer/Adapter/ModuleAdapter.php
Lines 337 to 356 in 2c30264
To mitigate this in the easiest possible way I propose to require (for the J4 native modules, not the legacy) one field in the XML: eg
<element>mod_wow</element>;Testing Instructions
You could test this in 2 different ways:
mod_quickiconadministrator/mopdules/mod_quickiconto a folder outside of the Joomla folderfile mod_quickicon.php doesn't exist)<filename module="mod_quickicon">mod_quickicon.php</filename>and adding after line 3<element>mod_quickicon</element>then zip the contents of the folder and try againAlternative you can download
https://jinvalidate.netlify.app/dist/j4/mod_invalidatecache_0.0.6.zipand observe that the module installs correctlyActual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
Documentation Changes Required
@laoneo some feedback here?
@wilsonge ?