-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
php notice on ExtensionAdapter.php #34959
Comments
hi, |
The proposed change is not right in my opinion from reading the original code here https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Updater/Adapter/ExtensionAdapter.php#L331 . But I can’t dig deeper right now. |
hi, $this->latest = Joomla\CMS\Table\Update Is my conclusion correct? |
@jschmi102 In Joomla4, the client in update server definition needs to be client name (site/administrator) instead of client id like in the past. I don't know when the decision was made but that makes sense because the tag is client, not client_id like in the past So you should check the update sites of the extensions use on your site, if there is any update server use ID (0, 1) for client, please contact them and tell them to change it to site/administrator to have it compatible with Joomla 4 (I need to change it in my extensions, too, I still use client ID at the moment :( ) Take a look at Akeeba backup update server for example https://cdn.akeeba.com/updates/pkgakeebacore.xml , you will see that they use site instead of For more information, we have deprecated using Client ID for client in Joomla 3 already, see https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Updater/Adapter/ExtensionAdapter.php#L356-L365 |
hi, Nevertheless i think the code in ExtensionAdapter.php has to be changed. E..g. check that client is not numeric. |
@jschmi102 Agree that the code should be updated. Maybe show a warning if ID (0/1) is used instead of name (site/administrator) |
How about this (like in joomla3):
|
@jschmi102 No, the purpose of deprecated in J3 and removed it in J4 is to force developer to use correct value for client tag on update server So if it still use numeric value, we should show a warning show that they know about it and update. That's how I think/understand how it should work. |
If I click "check for updates" on extensions I'm seeing 7 php-notices:
PHP Notice: Trying to get property 'id' of non-object in C:\\myjoomla4\\libraries\\src\\Updater\\Adapter\\ExtensionAdapter.php on line 333, referer: http://localhost/myjoomla4/administrator/index.php?option=com_installer&view=update
Could it be that check on ExtensionAdapter.php line 331 is wrong? ( e.g. notice is gone if check is changed to
if (isset($this->latest->client) && !\strlen($this->latest->client))
Or what else is the problem?
The text was updated successfully, but these errors were encountered: