So, the Joomla project has chosen to stop people upgrading from Joomla 4.0.0 to 4.2.0 in one step - because of #38474
Instead users of Joomla 4.0.0 are forced first to 4.1.5 by joomla/update.joomla.org#261
When a user attempts a 4.0.0 to 4.1.5 upgrade they end in an error message:
Call to undefined method Joomla\Component\Joomlaupdate\Administrator\Model\UpdateModel::isTemplateActive()
Joomla should be able to upgrade through the PUBLISHED and OFFERED upgrade path with a smooth upgrade experience and no error messages
The solution - again - is to delete administrator/cache/autoload_psr4.php
Face meet desk.
This is because - like I said - ALL versions before 4.0.5 had no concept of deleting the administrator/cache/autoload_psr4.php and so would break on any upgrade.
THE CORRECT way of "fixing" this is to fix it in com_joomlaupdate and RELEASE A NEW VERSION of com_joomlaupdate which needs to be updated before upgrading Joomla.
Labels |
Added:
No Code Attached Yet
|
Title |
|
Could you post to us the specifications of the maschine that you are running your tests with?
Yes its on the list thanks.
The file administrator/components/com_joomlaupdate/finalisation.php is called at the end of extraction process, so the change from #37990 should be available when update from any Joomla version. So in theory, we do not need to release new version of com_joomlaupdate.
I also just tried to update from 4.1.0 to 4.2.0 from my local computer and it worked well. Maybe it is not working is because the old code is still used somehow (cache?) ?
yes that are our results too. there are many sits where its working fine but some where it does not. interestingly it can be regular reproduced when going from 4.0.0 to 4.2 but not when going from 4.0.0 to 4.1.5 while it still looks like phil is getting it there too. we are still investigation se we can understand whats happening. we have also got reports of 4.1.5 to 4.2.0 upgrades fail but again not all the time just sometimes.
@zero-24 I have gotten various weird issues on three out of six sites I upgraded from 4.1.5 to 4.2.0 because the autoload_psr4.php file is not being removed. My theory is that there was traffic on the site which prevented the file from being removed.
I will submit a PR for JoomlaUpdate's extract.php to do that so you could publish a new JoomlaUpdate version to address this.
@PhilETaylor The finalisation.php DOES have code to remove that file. That said, I think it is the wrong place to have that code. This code should be running before we include finalisation.php. Give me 5' for the PR and you can tell me if it works for you?
It's right that Joomla older than 4.0.4 use the file finalisation.php which does not have code to re-generate namespace map and that's the root reason causing the error
If you use Joomla 4.0.4 or newer, upgrade should work well.
@joomdonation @PhilETaylor Can you pease test #38491 since you clearly both have environments demonstrably affected by this issue? My PR is more of an educated guess based on my experience with the core code and the way restoring backups might break a site. Thank you.
but of course extract.php doesn't exist on 4.0.0 ... so.. like I said a whole new com_joomlaupdate would need releasing.
I EXPLICITLY said, in no uncertainty terms:
I will submit a PR for JoomlaUpdate's extract.php to do that so you could publish a new JoomlaUpdate version to address this.
You are being deliberately obtuse and disruptive a.k.a. toxic. Stop it.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-08-17 08:52:37 |
Closed_By | ⇒ | PhilETaylor |
Thank you for your valuable feedback and your personal attacks.
OK I've given @PhilETaylor a ban for this. This behaviour is unacceptable and I don't need active contributors to be subject to this.
Thanks we will look into that. But I'm suprised that it should be broken just now and that we have not got reports of similiar issues before.