-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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] Recreate namespace map on Joomla! update #36094
[4.0] Recreate namespace map on Joomla! update #36094
Conversation
Added the release blocker label as inherited from the issue. |
Is a Updater update needed? so if someone updates from 4.0.4 to 4.1 it will still crash? |
I would not make a hard reference to the map creator in the model. Instead of listen to the 'onTableAfterStore' event in the |
@bembelimen The modified file is extracted before the request is executed, so the new code will be executed, thus we do not need an update for Updater @laoneo I don't know how |
@joomdonation that sounds even better. As I made a bad experience adding new events to Joomla, I'm a bit hesitant to add a new ones, that's why I didn't suggest that. |
Yes, but what happens, if there is a plugin, which uses the new namespaces on a very early trigger (like onAfterInitialize), is this covered? |
As I understand, that plugin would only run on the next request. In the current request, the new plugin (if added in the update) is not available in database yet, so it is not being executed. |
I have tested this item ✅ successfully on 1592fc7 But anyways, changes are working for me. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36094. |
I have tested this item ✅ successfully on 1592fc7 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36094. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36094. |
I think not having this in a plugin is probably a good idea here - we don't want any weird issues if we ever namespace the plugin in the future. |
Thanks! |
hi im having this issue atm and idk what to do, I tried to download the link above but it says not found This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36094. |
@Crisje Delete the file administrator/cache/autoload_psr4.php from your Joomla 4 installation should help solving your issue. |
Thanx @Crisje for your tip that worked for me. But why is this still in 4.1.2 code? I did an update from 4.0.3 to 4.1.2 and ran into this error. Kind regards, HaSTe. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36094. |
Pull Request for Issue #36089.
Summary of Changes
This PR makes small modification to update Joomla! process so that namespace map is re-generated during Joomla! update. It is needed because when we update to new Joomla version which has new extension added, we need to register namespace of that new extension so that it can work properly.
Testing Instructions
Actual result BEFORE applying this Pull Request
Without the change from this PR, updating your site to the update package of this PR #35143 will cause a fatal error:
Expected result AFTER applying this Pull Request
Update success. Namespace for new extension is successfully registered in administrator/cache/autoload_psr4.php.
Documentation Changes Required
No.