Upgrade installation for existing sites with MODX 3.0.1

Summary

When trying to upgrade an existing MODX 3.0.1 installation a warning pops up and the upgrade cannot be finalized. I tried to run an upgrade using eactly the same MODX version I already installed on the same host because I suspected file permissions to be wrong at the existing installation.

Step to reproduce

  • Install MODX 3.0.1.
  • Once done, remove all MODX files from the siteroot
  • upload and unzip modx-3.0.1-pl.zip
  • run {…}/setup
  • choose “Upgrade existing…”
  • click “proceed” one time

Observed behavior

A warning appears:

Warning: Undefined array key “database_type” in /mnt/web320/a2/39/51887839/htdocs/xxxxxx/setup/includes/request/modinstallrequest.class.php on line 118 Warning: Undefined array key “database_server” in /mnt/web320/a2/39/51887839/htdocs/xxxxxx/setup/includes/request/modinstallrequest.class.php on line 118 Warning: Undefined array key “dbase” in /mnt/web320/a2/39/51887839/htdocs/xxxxxx/setup/includes/request/modinstallrequest.class.php on line 118 Warning: Undefined array key “database_connection_charset” in /mnt/web320/a2/39/51887839/htdocs/xxxxxx/setup/includes/request/modinstallrequest.class.php on line 118 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web320/a2/39/51887839/htdocs/xxxxxx/setup/includes/request/modinstallrequest.class.php:118) in /mnt/web320/a2/39/51887839/htdocs/xxxxxx/setup/includes/request/modinstallrequest.class.php on line 228

Expected behavior

Expected the database credential form.

Environment

MODX 3.0.1
Apache 2.4.54
PHP 8.1.11 as well as on PHP 8.0
MySQL 5.7

Hi @mod2019

I’m not sure why you would do this?

When you delete all the files, you’re also deleting the core/config/config.inc.php file.

This tells MODX about your database, amongst other things and I think that is why you are receiving the errors.

What exactly are you trying to do here - you don’t seem to be upgrading to a new version?

Normal procedure for a manual update would be to unzip the files over the existing ones, then run setup.

All right, that was helpful. My attempt was to set proper file permissions because they were messy after the initial installation. That’s why I chose the same MDX version again.

With following the approach you mentioned (unzip the files over the existing ones) and leaving core/config/config.inc.php alone I succeeded. Thank you for your very fast reply!

1 Like

The UpgradeMODX extra should have done all this for you.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.