Upgrade to 3.0 failed with multiple problems

Did you upgrade pdoTools to the newest?

That fixed it. Site is loading now. I guess I overlooked the PDO Tools update somehow.

I still have some updates in the package manager like Batcher that have an orange update button, but then give an error when clicked.

An error occurred while connecting to the Provider: No Package release found.

maybe, there isn’t a Batcher version, compatible with 3.x

Well, found another problem with SimpleSearch not returning any results and it has been updated to the 3.0.0-alpha version.

Check the system setting “simplesearch.driver_class”. Make sure the value is \SimpleSearch\Driver\SimpleSearchDriverBasic.

Hey @pixelstuff

If returning to PHP 8.0 still leaves you with a broken package manager - in my experience, this will likely be caused by an extra which doesn’t play well with PHP 8.0 and / or MODX 3.x.

findParent and Batcher are examples of extras which have caused this behaviour in the package manager for me in 3.x. getDate has caused this issue for others. There will be other offenders.

My original solution was to remove the extra from the modx_transport_packages table - but @halftrainedharry provided a simpler solution: change the value of the column “provider” to 0 for the offending row in the database table modx_transport_packages (instead of deleting the whole row).

It may take some trial and error but you should be able to find the culprit this way.

Look out for older extras and you can also check this Sitedash list for non-modx3-compatible extras.

Hope that helps.

Some other discussions around this issue:

This pull request should fix the problem with the package manager:


There is currently no Batcher version for MODX 3. I did a rewrite but AFAIK that hasn’t been released.

2 Likes

Are you saying the Search Driver Class needs to be set to SimpleSearchDriverBasic (which it is) or does it need the full URL of \SimpleSearch\Driver\SimpleSearchDriverBasic

It also looks like there is a Search Driver Class Path field which is empty.

What would be triggering the orange update button if there isn’t an update.

  • I have another package called Favicons that doesn’t seem to even exist in the store anymore. It shows an update button in 3.0.1, but not in 2.8.4.

  • There is also sekFancyBox showing the same update notice and error when trying to update.

Is there something inside the package that lists the maximum version compatible, so MODx 3 is prompting to update even if it doesn’t see one?

EDIT: it appears that the Package Manager fix for PHP 8, also fixes the update buttons. Fix Package Manager handling of API error by halftrainedharry · Pull Request #16217 · modxcms/revolution · GitHub

Yes, it needs the fully qualified class name.

On update this value should get overwritten but there is a bug in the current version.

Thanks, that fixed the SimpleSearch issue.

One more problem related to PHP 8.0. The site gets the following message inserted above every page on the site. If I revert back to PHP 7.4 then the message goes away.

Warning : Undefined array key “modUser” in /ROOTFOLDER/core/vendor/xpdo/xpdo/src/xPDO/xPDOMap.php on line 48

Notice : Indirect modification of overloaded element of xPDO\xPDOMap has no effect in /ROOTFOLDER/core/components/tickets/model/tickets/metadata.mysql.php on line 26

Is this likely to be a problem with xPDO itself or with some pdoTools? The page does mostly render below the message with some bad formating in the top navigation area. Both pdoField and pdoMenu are used in the top nav on every page of the site.

This seems to be a problem with the extra Tickets.

If you use Tickets, then here is a possible fix (completely untested though):

$tmp = $this->map->offsetGet('MODX\Revolution\modUser');
$tmp['composites']['AuthorProfile'] = array(
	'class' => 'TicketAuthor',
	'local' => 'id',
	'foreign' => 'id',
	'cardinality' => 'one',
	'owner' => 'local',
);
$this->map->offsetSet('MODX\Revolution\modUser', $tmp);

Do you know enough about PHP 8 to summarize or theorize about why it seems to break so many things compared to PHP 7? What does it do differently?

The issue above is not a problem with PHP 8. The problem is that the extra Tickets hasn’t been adapted to work with MODX 3. It didn’t work with PHP 7. PHP 8 probably just shows more warnings/notices.

That does seem to clear the errors. Hopefully it works everywhere else.

I’m experiencing issues 2 and 4 as well on multiple sites when upgrades from 2 to MODX 3:
Empty manager tree (menu not opening as well, and renders ‘javascript:;’) and Package manager not loading.

Sites using both PHP 7.4 or 8.

Try @halftrainedharry’s submitted pull request

Can anyone help with the blank manager tree? I have it in almost every site that has been upgraded tot MODX 3. Pretty annoying for my customers.

Did you try the patch to the GetList.php file listed in @halftrainedharry 's pull request?

If you didn’t understand it, find this file:

core/src/Revolution/Processors/Workspace/Packages/GetList.php

Then on line 218 replace:

$updates = ['count' => count($updates)];

with:

$updates = is_array($updates) ? ['count' => count($updates)] : ['count' => 0] ;

If that doesn’t fix the resource tree, then do you have any error messages popping up in the Error Log when trying to load the tree?