We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3866 ☆ A M B ☆
    • 350 Posts
    Hi there,

    Was upgrading a site from 2.2.0 to 2.2.4 when I ran into an issue regarding this plugin. With the setup process I only got as far as checking the files when an error was returned to with cache files.

    Tried deleting cache files but that didn't work.

    Spent several hours trying to establish which package / plugin was causing the issue and whittled it down to activationemail. I uninstalled and was able to upgrade without issue.

    Unfortunately I've got a copy of the actual error that was returned because I was so intent on finding a solution!

    But hopefully post might help anyone else who runs into a similar upgrade problem.
      Helen Warner
      Number one pixel!
      Proud to be linked with MODX at Crimson Pixel
      • 3749
      • 24,544 Posts
      Thanks for reporting that. Was everything green on the configuration check page, or did it die before that.


      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 3866 ☆ A M B ☆
        • 350 Posts
        Hi Bob,

        Setup was going fine and everything checked out on the configuration page, as soon as I clicked next it returned an error relating to an element in the cache. I did clear cache manually but that didn't work.

        I had to disable plugin before it would upgrade. After that the upgrade went as normal, and I then enabled the plugin again.

        I did check error report in manager but there wasn't anything there.
          Helen Warner
          Number one pixel!
          Proud to be linked with MODX at Crimson Pixel
          • 3749
          • 24,544 Posts
          Thanks. I think I see what the problem is, but I need to reproduce it to be sure.

          It doesn't happen for me when upgrading from 2.2.4 to 2.2.4, but when you upgrade from earlier versions, MODX actually performs all the intermediate upgrades one-by-one. One of the upgrades (I think 2.2.1) alters and saves the user object which fires OnUserBeforeSave, which triggers ActivationEmail at a point where the paths are not yet set properly.

          At least that's my theory. wink



          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 3866 ☆ A M B ☆
            • 350 Posts
            Hey Bob - it happened again, but at least I knew what the problem was. I was upgrading a site from 2.1.8 to 2.2.4 and the activationemail plugin had to be disabled and the cache manually cleared before setup would run successfully. But I did make a note of the error message smiley

            Fatal error: Call to a member function getOption() on a non-object in /home/fomphc/public_html/core/cache/includes/elements/modplugin/5.include.cache.php on line 95


            Over to you...
              Helen Warner
              Number one pixel!
              Proud to be linked with MODX at Crimson Pixel
              • 3749
              • 24,544 Posts
              Thanks!

              The fix is to change the if statement on line 84 of the plugin to this:

              if ($mode != modSystemEvent::MODE_UPD || ! is_object($modx) || !empty($modx->xpdo->config[xPDO::OPT_SETUP])) {
                  return '';
              }


              I just uploaded a new version (1.1.1-pl).



              ------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using.
              MODX info for everyone: http://bobsguides.com/modx.html [ed. note: BobRay last edited this post 14 years ago.]
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting