No Code Attached Yet
avatar PhilETaylor
PhilETaylor
17 Aug 2021

Steps to reproduce the issue

to fake update available set

	$hasUpdate=true;
		$hasDownload=true;

in /administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php line 140ish

Go to http://example.com/administrator/index.php?option=com_joomlaupdate when update available

Expected result

No JS Errors

Actual result

TypeError: a.nonCoreCriticalPlugins.filter is not a function. (In 'a.nonCoreCriticalPlugins.filter((e=>!(e.package_id.toString()===n||e.extension_id.toString()===n)))', 'a.nonCoreCriticalPlugins.filter' is undefined)

Extension never completes its pre update check and throbber is still shown

Screenshot 2021-08-17 at 14 50 35

System information (as much as possible)

safari on mac

Additional comments

avatar PhilETaylor PhilETaylor - open - 17 Aug 2021
avatar joomla-cms-bot joomla-cms-bot - change - 17 Aug 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Aug 2021
avatar PhilETaylor PhilETaylor - change - 17 Aug 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 17 Aug 2021
avatar PhilETaylor PhilETaylor - change - 17 Aug 2021
Title
[4.0.0] TypeError: a.nonCoreCriticalPlugins.filter is not a function
[4.0.0][Release Blocker] TypeError: a.nonCoreCriticalPlugins.filter is not a function
avatar PhilETaylor PhilETaylor - edited - 17 Aug 2021
avatar PhilETaylor PhilETaylor - change - 17 Aug 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 17 Aug 2021
avatar PhilETaylor PhilETaylor - change - 17 Aug 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 17 Aug 2021
avatar PhilETaylor PhilETaylor - change - 17 Aug 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 17 Aug 2021
avatar PhilETaylor PhilETaylor - change - 17 Aug 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 17 Aug 2021
avatar nikosdion
nikosdion - comment - 17 Aug 2021

I've said it before, I will say it again. The extensions compatibility check should just be removed. Everyone who's worked on this has not been around a real world live site and has never talked to a real world user.

Speaking of real world sites, here are my observations from the past two months alone.

I have seen sites with orphaned sub-extensions because using Discover or extracting a package to install sub-extensions will of course not register a package_id. If you install the package with the same extensions... the package ID is not recorded because that somehow makes sense!

Joomla reports extensions which report themselves compatible with the next version as having potential upgrade issues, however nicer it's worded now. Essentially, they are telling the users that it doesn't matter if the developer has tested their extensions and updated their updates sites to let you know, we want you to pester them and not trust them. At the same time you want companies to invest time helping build Joomla. How can we do that when we barely have enough time as it is and you're destroying good will?

Joomla bases the compatibility information on the update information which are famously getting stuck for no reason at all, or blocked by server firewalls (if you actually talk to real world users you will see just how common it is). Even worse, if you have enabled cache in Global configuration because the model's query results are cached so Joomla will keep seeing out of date information for as long as your frontend page cache duration is set for. Any notion that the update information is guaranteed to be fresh and accurate is not grounded on reality.

In the end of the day, even if everything worked perfectly an unscrupulous developer could say that their extension is compatible with \d+\.\d+ (remember that the Joomla version compatibility is a RegEx) which satisfies all versions which will ever be released until Joomla stops existing. Can someone spell pointless?

So there's a whole lot of pain maintaining this very fragile code for a confusing interface which is actively dissuading people from upgrading Joomla and/or encouraging them to inundate extension developers with pointless questions without achieving anything at all. Definitely not the stated goal of preventing broken sites on update.

This whole mess can be replaced with a simple information box reading “Make sure your extensions are compatible with the Joomla X.Y.Z you are about to upgrade to. If an extension is incompatible with this new version of Joomla your site may become inaccessible. Always test your updates on a copy of your site if you are not sure.”

The effect is the same, there is no code to break and you are not stupidly asking the user to confirm that their extensions are compatible with the update before installing the update which they need to do to confirm that the extensions are actually compatible with the update.

It's never too late to remove an anti-feature.

It can be replaced by making the actual version to be released available to developers 3 business days in advance, without any last minute changes thrown in there, with very good communication of the timeline of new releases well in advance instead of catching us all by surprise and having us try to figure out why we tested against the last RC and the stable version 2 days later is a hot mess that breaks everything. THIS is how you avoid broken sites on update. It's so painfully obvious to anyone who's ever done professional software development. If you fling random last minute changes to people things will break. It's not even a matter of "if". It's a guarantee.

avatar PhilETaylor PhilETaylor - change - 17 Aug 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 17 Aug 2021
avatar PhilETaylor PhilETaylor - change - 17 Aug 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-08-17 14:22:25
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 17 Aug 2021
avatar PhilETaylor
PhilETaylor - comment - 17 Aug 2021

My bad... actually this is caused by inconsistency in the update cdn which is now resolved.

I have now blown everything away (actually moved to a different physical location) to debug this, and its working fine.

Add a Comment

Login with GitHub to post a comment