We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36551
    • 416 Posts
    Seems to be my week for Modx weirdness...

    What's up with this?



    Updater shows a system update is available, but upgrade Modx has no upgrade button.

    Host iPage
    PHP 5.3
    cURL is enabled

    Updater has sucessfully updated extras.
      • 3749
      • 24,544 Posts
      I'm guessing here, but maybe the UpGradeMODX check for the latest version timed out and it cached the empty value. It might correct itself when the next check is due (or not). It's also possible that there's a conflict between the two widgets.
        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
        • 36551
        • 416 Posts
        And the weirdness continues. This morning as I logged into the manager I get this:

        Fatal error: Cannot use object of type stdClass as array in /xxxxxx/xxxxxxx/xxxxxx/core/components/updater/model/updater.class.php on line 307
                    if (!curl_errno($ch)) {
        
                        if ($debug) $this->modx->log(modX::LOG_LEVEL_INFO, "[Updater] curl called: ".curl_errno($ch));
                        $curl_return = json_decode($content);
        
        line 307 --->   if (isset($curl_return['message'])) {
        
                            $this->setLatestCoreVersion(null);
                            $this->modx->cacheManager->set( 'latestCoreVersion', $latest, $this->cacheExpires, $this->cacheOptions);
                            $this->errorMessage = "Github server replied with message: ".$curl_return['message'];
        
                            if ($debug) $this->modx->log(modX::LOG_LEVEL_INFO, "[Updater] github reply: ".$content);
                            $this->modx->log(modX::LOG_LEVEL_ERROR, "[Updater] github server did not reply with proper json. Server Error. Reply: ".$this->errorMessage);
        
                            return false;
                        } else {
        
                            $versionArr = json_decode($content);
                            curl_close($ch);

        I manually disabled the updater observer plugin in the DB. The other two were already disabled.

        I manually cleared the cache on the server and in my browser. No change.

        Should I try to remove the plugin? How would one do that outside of the manager? Is it even advised?
          • 36551
          • 416 Posts
          And now the error is gone and the upgrade modx button is back.

          Must be gremlins

          Update: clicking the upgrade button results in a white screen. Returning to the manager, the button is gone.

          I'm going to blame this on the hosting. It's super cheap, the interface is old so I'm going to guess that server config is flaky or out of date. [ed. note: terrybarth last edited this post 11 years ago.]
            • 3749
            • 24,544 Posts
            In the current version, you can get a blank screen if both cURL and allow_url_fopen are disabled (as they might be on a cheap host). It will be fixed in the next version.

            Try changing line 46 of the UpgradeModxScriptSourcs chunk from this:

            } elseif ('allow_url_fopen') {


            to this:

            } elseif (ini_get('allow_url_fopen')) {


            My guess is that you'll get an error message about cURL and allow_url_fopen both being disabled. If so, and your host will enable cURL for you, it should work.

              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
              • 36551
              • 416 Posts
              I've already updated this site so I can't test this out on this one.

              I'll try this, or the updated version on my next project.

              Thanks Bob!
                • 3749
                • 24,544 Posts
                Sorry I can't be much help now -- pinched nerve in my shoulder -- can only type with one hand. New version coming out as soon as I get the use of my hand back. wink
                  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