No Code Attached Yet
avatar PhilETaylor
PhilETaylor
16 Aug 2022

Steps to reproduce the issue

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()

Expected result

Joomla should be able to upgrade through the PUBLISHED and OFFERED upgrade path with a smooth upgrade experience and no error messages

Actual result

Screen Shot 2022-08-16 at 23 21 47

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.

avatar PhilETaylor PhilETaylor - open - 16 Aug 2022
avatar joomla-cms-bot joomla-cms-bot - change - 16 Aug 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 16 Aug 2022
avatar PhilETaylor PhilETaylor - change - 16 Aug 2022
The description was changed
avatar PhilETaylor PhilETaylor - edited - 16 Aug 2022
avatar PhilETaylor PhilETaylor - change - 16 Aug 2022
Title
4.0.0 to 4.1.5 upgrade path now also broken
4.0.0 to 4.1.5 upgrade path now also broken - Call to undefined method UpdateModel::isTemplateActive()
avatar PhilETaylor PhilETaylor - edited - 16 Aug 2022
avatar PhilETaylor PhilETaylor - change - 16 Aug 2022
The description was changed
avatar PhilETaylor PhilETaylor - edited - 16 Aug 2022
avatar zero-24
zero-24 - comment - 16 Aug 2022

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.

avatar zero-24
zero-24 - comment - 16 Aug 2022

Could you post to us the specifications of the maschine that you are running your tests with?

avatar zero-24
zero-24 - comment - 16 Aug 2022

Yes its on the list thanks.

avatar joomdonation
joomdonation - comment - 17 Aug 2022

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?) ?

avatar zero-24
zero-24 - comment - 17 Aug 2022

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.

avatar nikosdion
nikosdion - comment - 17 Aug 2022

@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.

avatar nikosdion
nikosdion - comment - 17 Aug 2022

@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?

avatar joomdonation
joomdonation - comment - 17 Aug 2022

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.

avatar nikosdion
nikosdion - comment - 17 Aug 2022

@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.

avatar nikosdion
nikosdion - comment - 17 Aug 2022

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.

avatar PhilETaylor PhilETaylor - change - 17 Aug 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-08-17 08:52:37
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 17 Aug 2022
avatar nikosdion
nikosdion - comment - 17 Aug 2022

Thank you for your valuable feedback and your personal attacks.

avatar wilsonge
wilsonge - comment - 17 Aug 2022

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.

Add a Comment

Login with GitHub to post a comment