Upgrading from 2.5 to 2.7

Summary

Not sure where to put this, but a couple of times when I’ve upgraded a MODX site from 2.5 to 2.7, the setup fails at the last step, which I assume is the clean up process. What occurs is that PHP throws a critical error that the function ‘recursiveRemoveDir’ is already defined.

To get around it, I’ve had to edit the ‘setup/includes/upgrades/common/2.5-cleanup-script.php’ file and wrap the function around a

if (!function_exists('recursiveRemoveDir')) {

code block. Once done, the setup continues on as per normal.

This did not occur when I upgrade 2.5 to 2.6, as far I remember.

Is this something happening with 2.7 upgrades?

Step to reproduce

Upgrade a MODX 2.5.x site with the latest 2.7.1 and re-run the setup until the last clean step is made.

Observed behavior

After the upgrade, the clean up throws a PHP error.

Expected behavior

It should take the user to final screen asking to them to login and/or remove the setup folder.

Environment

PHP 7.1 or 7.2
MySQL
Linux
Apache

1 Like

Just a note, to get code blocks dont use the preformatted text tags as they don’t work properly. Instead, put three single ticks on the line above and below the code

1 Like