Error when fixing assets table

Joomla versions 2.5, 1.7 and 1.6 are all end-of-life since December 31st 2014 and are no longer supported. Please use Joomla 3.x instead.

Moderator: 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.
Locked
User avatar
cbahiana
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 186
Joined: Wed Aug 24, 2005 2:03 pm
Location: Rio de Janeiro
Contact:

Error when fixing assets table

Post by cbahiana » Wed Dec 17, 2014 1:25 pm

Hi folks,

I'm making the preparations for the migration of a large portal from 2.5.28 to 3.3.6. As part of that preparation I'm running assetweaver.php and assetfix.php to make corrections on the assets table prior to the actual migration.

This time I'm getting an odd message from assetweaver:
PHP Fatal error: Cannot use object of type Asset as array in assetweaver-classes.php on line 319
That line has

Code: Select all

$asset->parent_asset = $sel[0];
I copied the portal to two other servers, including my localhost, but result is the same.

Any clues?
Carlos Bahiana
You can't always get what you want, but if you try sometimes...

itoctopus
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4025
Joined: Mon Nov 25, 2013 4:35 pm
Location: Montreal, Canada
Contact:

Re: Error when fixing assets table

Post by itoctopus » Wed Dec 17, 2014 3:41 pm

Try doing a print_r on $sel, what do you see?

It might be that the code needs to be:

Code: Select all

$asset->parent_asset = $sel;
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter

User avatar
cbahiana
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 186
Joined: Wed Aug 24, 2005 2:03 pm
Location: Rio de Janeiro
Contact:

Re: Error when fixing assets table

Post by cbahiana » Thu Dec 18, 2014 10:34 am

Thank you itoctopus, I went directly to changing the code as you suggested and it worked great!
Carlos Bahiana
You can't always get what you want, but if you try sometimes...


Locked

Return to “Migrating and Upgrading to Joomla! 2.5”