We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37286
    • 160 Posts
    I've been working on an addon and while testing I got some strange results. My setup.options.php file that has some install and update actions. It looks something like:
    $output = '';
    switch ($options[xPDOTransport::PACKAGE_ACTION]) {
        case xPDOTransport::ACTION_INSTALL:
            $output = '<h2>Install</h2>';
            break;
        case xPDOTransport::ACTION_UPGRADE:
            $output = '<h2>Update</h2>';
            break;
        case xPDOTransport::ACTION_UNINSTALL:
            break;
    }
    return $output;
    


    So, on a fresh install of the addon, I see "Update" in the setup options window. Then when I made some changes and went to update the addon, the setup window shows me "Install".

    Now, my resolve.tables.php file has essentially the same layout and it appears to function as predicted. It installs the tables listed under ACTION_INSTALL and updates the proper fields under the ACTION_UPGRADE. Has anyone else noticed this?
      • 22303 MODX Staff
      • 10,725 Posts
      I believe this may be related to http://tracker.modx.com/issues/9517 and/or http://tracker.modx.com/issues/8173 -- I'll look into this in more depth if this is not resolved by the fix to #9517...
        • 37286
        • 160 Posts
        Thanks