UpgradeMODX icon indicating copy to clipboard operation
UpgradeMODX copied to clipboard

White screen on upgrade to upgrademodx-2.1.4-pl

Open lektriq opened this issue 4 years ago • 5 comments

On upgrade I’m presented with a white screen on manager access attempt.

Upgrading to upgrademodx-2.1.4-pl MODX 2.8.1 With custom core location

Manger error log shows

[22-Mar-2021 11:38:57 Europe/London] PHP Fatal error: require_once(): Failed opening required '/home/XXXXX/public_html/1XXXXX/core/components/upgrademodx/vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/XXXXX/modx-system/XXXXX/core/components/upgrademodx/model/upgrademodx/upgrademodx.class.php on line 182

This was fixed by editing core/components/upgrademodx/model/upgrademodx/upgrademodx.class.php at line 180

Original content was:

$v = (int) $this->modx->getVersionData()['version'];
if ($v >= 3) {
    $path = $this->modx->getOption('core_path', null);
} else {
    $path = MODX_BASE_PATH . 'core/components/upgrademodx/';
}
require_once $path . 'vendor/autoload.php';

To fix, edited to:

$v = (int) $this->modx->getVersionData()['version'];
if ($v >= 3) {
    $path = $this->modx->getOption('core_path', null);
} else {
    $path = MODX_CORE_PATH . 'components/upgrademodx/';
}
require_once $path . 'vendor/autoload.php';

lektriq avatar Mar 22 '21 14:03 lektriq

Just came here to report the same issue. Thanks @lektriq for the detailed report. I used the same fix.

smaddock avatar Mar 22 '21 14:03 smaddock

Thanks for the heads up! I've updated the 2.1.4 package at modx.com/extras.

For those experiencing the problem, you can get into the Manager by putting this in your browser's address bar (corrected for the site URL and name of manager folder):

yoursite.com/manager/?a=resource/update&id=1

Once you're in the Manager:

  1. Go to Extras -> Installer.
  2. Uninstall and remove UpgradeMODX
  3. Re-download and re-install UpgradeMODX

Or just change line 180 of the upgrademodx.class.php file to:

$path = MODX_CORE_PATH . 'components/upgrademodx/';

Sorry about the trouble. For the curious, this got by me because my dev. environment has another vendor directory at that location.

The new version should also work in MODX 3.

Let me know if this works.

BobRay avatar Mar 22 '21 15:03 BobRay

  1. Go to Extras -> Installer.
  2. Uninstall and remove UpgradeMODX
  3. Re-download and re-install UpgradeMODX

Let me know if this works.

Yes, that works, earlier today I updated about 60 websites through SiteDash, and I really don't want to have to update every one of them manually. Any way you can make this 2.1.5 so that SiteDash can see the change?

SnowCreative avatar Mar 22 '21 16:03 SnowCreative

Yes, 2.1.5 is there now.

BobRay avatar Mar 22 '21 19:03 BobRay

Thanks! All good now.

SnowCreative avatar Mar 22 '21 20:03 SnowCreative