User tests: Successful: Unsuccessful:
Pull Request for Issue #36089.
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.
Without the change from this PR, updating your site to the update package of this PR #35143 will cause a fatal error:
0 Class 'Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent' not found
Update success. Namespace for new extension is successfully registered in administrator/cache/autoload_psr4.php.
No.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_joomlaupdate |
Labels |
Added:
?
|
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 plugins/extension/namespacemap/namespacemap.php
plugin and recreate the map.
@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 onTableAfterStore
helps here. If we want to go with plugin approach, I think we can trigger a new event onJoomlaAfterUpdate
(we triggered onJoomlaBeforeUpdate
earlier) and add new method to plugins/extension/namespacemap/namespacemap.php to re-create the map.
@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.
@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
Yes, but what happens, if there is a plugin, which uses the new namespaces on a very early trigger (like onAfterInitialize), is this covered?
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
For the test scenario you should not patch the base 4.0 version but only the version you're updating to. (it's then like 4.0.4 => 4.1).
But anyways, changes are working for me.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
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.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-11-25 21:17:53 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
Release Blocker
|
Thanks!
hi im having this issue atm and idk what to do, I tried to download the link above but it says not found
please if anyone could help me
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.
Added the release blocker label as inherited from the issue.