Find extension updates triggers error "Attempt to assign property "version" on null" Topic is solved

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
Joomalaboo
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Oct 10, 2017 9:15 am

Find extension updates triggers error "Attempt to assign property "version" on null"

Post by Joomalaboo » Fri Oct 07, 2022 12:09 pm

I've searched the internet and this forum for people who came across this problem but so far couldn't find anything.

I have the issue that Joomla 3.10.11 isn't able anymore to check for extension updates. When I go to the extension manager and click the button "find updates" I get an error:

0 Attempt to assign property "version" on null

I don't know how to debug this error. Anyone here who could help me with the next steps?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 29500
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by Per Yngve Berg » Fri Oct 07, 2022 2:04 pm

Try to rebuild update sites.

Joomalaboo
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Oct 10, 2017 9:15 am

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by Joomalaboo » Fri Oct 07, 2022 2:51 pm

Hi Per, thanks for your help. Much appreciated!
Could you clarify your remark a bit further? I don't understand what you mean by rebuilding the update sites.

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13099
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by sozzled » Fri Oct 07, 2022 6:28 pm

“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

Joomalaboo
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Oct 10, 2017 9:15 am

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by Joomalaboo » Sat Oct 08, 2022 1:31 pm

Thanks Sozzled and Per. Unfortunately, rebuilding the update sites did not change anything. Still the same error message.

Any further ideas how to fix this? Thanks a lot in advance!

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 15258
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by toivo » Sat Oct 08, 2022 8:23 pm

Go to Global Configuration and set the level of error reporting to 'Maximum' and enable the Debug option. Try to update the extensions and post the messages here.
Toivo Talikka, Global Moderator

Joomalaboo
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Oct 10, 2017 9:15 am

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by Joomalaboo » Sun Oct 09, 2022 7:56 pm

Hi Toivo, thanks for your advice. Here's what happened:
- I changed error reporting to 'maximum'
- My backend would load anymore (blank page)
- My front end didn't render the css anymore and error messages appeared.
- After a google search I found a post about the php version that could cause the backend to show a blank page
- I went to my hosting environment and changed php from 8.1 to 7.4
- Now the backend and front end load correctly. And the update function also is working again without the error I've mentioned in this thread.
- As a final check, I've changed php version to 8.0. Update function not working, same old error message appears.

Conclusions? Tips?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 15258
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by toivo » Sun Oct 09, 2022 9:04 pm

Turn on the Debug option in Global Configuration and also enable the plugin System - Debug. That combination will display a detailed error message and the call stack, which will identify the incompatible extension.
Toivo Talikka, Global Moderator

Joomalaboo
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Oct 10, 2017 9:15 am

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by Joomalaboo » Thu Oct 13, 2022 8:21 pm

Hi Toivo, I followed your advice and enabled the plugin System - Debug and turned on system debug. After that, I let Joomla search for extensions updates. This is the output on the backend:

0 Attempttoassignproperty"version"onnull
../public_html/libraries/src/Updater/Adapter/ExtensionAdapter.php:69

Call stack first column: Function
1 ()
2 Joomla\CMS\Updater\Adapter\ExtensionAdapter->_startElement()
3 xml_parse()
4 Joomla\CMS\Updater\Adapter\ExtensionAdapter->findUpdate()
5 Joomla\CMS\Updater\Updater->getUpdateObjectsForSite()
6 Joomla\CMS\Updater\Updater->findUpdates()
7 InstallerModelUpdate->findUpdates()
8 InstallerControllerUpdate->find()
9 Joomla\CMS\MVC\Controller\BaseController->execute()
10 require_once()
11 Joomla\CMS\Component\ComponentHelper::executeComponent()
12 Joomla\CMS\Component\ComponentHelper::renderComponent()
13 Joomla\CMS\Application\AdministratorApplication->dispatch()
14 Joomla\CMS\Application\AdministratorApplication->doExecute()
15 Joomla\CMS\Application\CMSApplication->execute()

Call stack second column: Location
JROOT/libraries/src/Updater/Adapter/ExtensionAdapter.php:69
JROOT/libraries/src/Updater/Adapter/ExtensionAdapter.php:332 JROOT/libraries/src/Updater/Updater.php:286 JROOT/libraries/src/Updater/Updater.php:167 JROOT/administrator/components/com_installer/models/update.php:258 JROOT/administrator/components/com_installer/controllers/update.php:101 JROOT/libraries/src/MVC/Controller/BaseController.php:702 JROOT/administrator/components/com_installer/installer.php:19 JROOT/libraries/src/Component/ComponentHelper.php:402 JROOT/libraries/src/Component/ComponentHelper.php:377 JROOT/libraries/src/Application/AdministratorApplication.php:101 JROOT/libraries/src/Application/AdministratorApplication.php:159 JROOT/libraries/src/Application/CMSApplication.php:225 JROOT/administrator/index.php:51

I can't see any extension name that pops up. How should I read this?

I've also checked the log file in adminstrator/logs on my server. But no errors there that point towards a specific extension.

Joomalaboo
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Oct 10, 2017 9:15 am

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by Joomalaboo » Tue Oct 18, 2022 12:26 pm

Any ideas anyone how to continu debugging this issue? I am at a loss here.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 15258
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by toivo » Tue Oct 18, 2022 12:57 pm

Joomalaboo wrote:
Thu Oct 13, 2022 8:21 pm
0 Attempttoassignproperty"version"onnull
../public_html/libraries/src/Updater/Adapter/ExtensionAdapter.php:69
Are you sure the website has Joomla 3.10.11? Have the previous updates to later versions of Joomla always succeeded?

The reason for the questions is line 69 in ExtensionAdapter.php in Joomla 3.10.11, which line does not refer to 'version':

Code: Select all

					$this->currentUpdate->$name = '';
Download the Joomla! 3.10.11 Upgrade Package (.zip), then go to Components - Joomla! Update and continue to the tab 'Upload & Update'. Choose the downloaded update package and click 'Upload & Install'. Hopefully that will fix the inconsistency in the file ExtensionAdapter.php.
Toivo Talikka, Global Moderator

Joomalaboo
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Oct 10, 2017 9:15 am

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by Joomalaboo » Tue Oct 18, 2022 1:17 pm

Thanks Toivo, I'll try that. Will get back to you asap. Thanks for taking the time to help me out here. Really kind of you.

Joomalaboo
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Oct 10, 2017 9:15 am

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by Joomalaboo » Wed Oct 19, 2022 12:10 pm

I've uploaded and installed the update package as described Toivo. I am sorry to have to report that it did not fix the issue.

But I did find a fix afterward. Here's what solved the problem:
- Went to Extensions->Manage->Update sites
- Selected all Update sites and disabled them
- Checked if the error is still thrown by going back to Extensions->Manage->Update and hit the "Find Updates" button
- No error
- Then I enabled the update sites one at a time and checked after each one of them if the "Find Updates" button resulted in an error
- By systematically going through the list of update sites, I find the culprit and deleted it.

Now all update sites that are left are back on enabled and the "Find update" operation works fine.

Thanks all for your help, especially Toivo for sticking with me on this one!

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 15258
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Find extension updates triggers error "Attempt to assign property "version" on null"

Post by toivo » Wed Oct 19, 2022 12:37 pm

Cheers, and well done! The extension must have been an older one or the update site had somehow a fault.
Toivo Talikka, Global Moderator


Post Reply

Return to “Extensions for Joomla! 3.x”