Install this fake "paid download" extension Null file. Thanks @nikosdion for the file.
In Joomla 4 admin check for updates for this extensions on /administrator/index.php?option=com_installer&view=update page
No PHP warnings are logged in the php log
REGARDLESS that this is not a real plugin...
REGARDLESS that this php warning is never shown to the screen ...
REGARDLESS that the update to this non-real plugin is not valid...
... Joomla should still not be attempting to read properties on null objects.
In logs, could not get it to show on the screen even with debug on and error reporting max
PHP Warning: Attempt to read property "id" on null in /application/libraries/src/Updater/Adapter/ExtensionAdapter.php on line 333
4.0-dev
Labels |
Added:
No Code Attached Yet
|
If the project is actually interested in solving this I can make the one line PR for the change I have already commented. I need either @wilsonge or @HLeithner to give me to go–ahead. Until this is fixed this problem will keep happening. It's not a matter of “whether”, it's just a matter of “how often”.
@nikosdion Will it also solve #29778 ? Or is that a different thing?
@richard67 Correct. It is the exact same issue.
@nikosdion yes please go ahead and support the numeric id, can you may add a note to deprecated this for 5.0? or at least a "reconsider" comment?
Okey-dokey! On it.
@nikosdion Could you mention the other issue #29778 too in the description of your PR? Thanks in advance.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-10-14 11:29:17 |
Closed_By | ⇒ | richard67 |
Done!
As far as I can tell the problem is that Joomla is trying to get the client information by name but the update XML needs to define it by numeric ID (at least if we want the update XML file to also work on Joomla 3).
Please also note that the official documentation also says the same:
So, this is a case of Joomla not following its own documentation.
The correct fix is to check if
$this->latest->client
is numeric (AS IT SHOULD, PER THE DOCUMENTATION AND BECAUSE THIS IS HOW JOOMLA 3 WORKS!). If it's numeric, assign $this->latest->client_id = $this->latest->client. Otherwise go through Application helper.To make it clear, the offending line should read:
DO NOT change the documentation to make a string again. This will break updates for extensions which are compatible with both Joomla 3 and 4. We already had this b/c break BS going from Joomla 1.7 to 2.5. We threw Joomla 1.6 and 1.7 users under the bus back then which was acceptable because 1.6 and 1.7 were STS and immediately EOL'ed when 2.5 came out. This is not an option with Joomla 3. If we have to choose between supporting our Joomla 3 or our Joomla 4 clients we will all support Joomla 3 clients and tell them to NOT upgrade to Joomla 4 before August 17th, 2023.