We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22448
    • 241 Posts
    I upgraded my template project to MODx 1.0.5, Ditto 2.1, and Wayfinder 2.5 beta.
    After the upgrade i started getting "unable to redeclare prePHx class". It appears that both Ditto and Wayfinder try to include their own version of phx.pre.class.inc.php file, which declares the prePHx class. As far as i can tell the files are identical. To solve the problem i added an existence check to both Ditto and Wayfinder snippets in order to prevent inclusion of the phx.pre.class.inc.php file if the class already exists like so:

    Ditto:
    if ($phx ==1 && !class_Exists("prePHx")) {
    $files["prePHx_class"] = $ditto_base."classes/phx.pre.class.inc.php";
    }

    Wayfinder:
    if ($phx && !class_Exists("prePHx")) {
    $files[’phx’] = $wayfinder_base.’includes/phx/phx.pre.class.inc.php’;
    }

    This solved the problem for me.