Skip to content

Setup fails with 503 after upgrade to 3.2 due to incorrect core path #16881

@sscWhitevision

Description

@sscWhitevision

Bug report

Summary

Upgrading to MODX 3.2 breaks the setup process. The file setup/includes/config.core.php was changed in 3.2 and now uses dirname(__FILE__) . '/core/' to define MODX_CORE_PATH, which resolves to setup/includes/core/ instead of the actual core/ directory at the web root.

Step to reproduce

  1. Have a working MODX 3.1.x installation
  2. Upgrade to MODX 3.2 via UpgradeMODX or by extracting the official 3.2 package
  3. Navigate to /setup/ to complete the upgrade

Observed behavior

The setup returns a 503 error. The file setup/includes/config.core.php resolves an incorrect path:

// File: setup/includes/config.core.php
define('MODX_CORE_PATH', dirname(__FILE__) . '/core/');
// Resolves to: /webroot/setup/includes/core/  ← WRONG
// Expected:    /webroot/core/

Expected behavior

The setup should correctly locate the core directory. The previous version handled this by using MODX_INSTALL_PATH to read the root config.core.php:

if (!defined('MODX_CORE_PATH')) {
    if (file_exists(MODX_INSTALL_PATH . 'config.core.php')) {
        require_once(MODX_INSTALL_PATH . 'config.core.php');
    } else {
        define('MODX_CORE_PATH', MODX_INSTALL_PATH . 'core/');
    }
}

Environment

  • MODX: upgrading from 3.1.2 to 3.2.0
  • PHP: 8.3
  • Server: Apache

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue in the code or project, which should be addressed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions