We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48440
    • 6 Posts
    I was having some issues with my previous version of ModX, 2.2.14 returning an 'undefined' manager and telling me access denied if I tried to do anything or log out, so I tried to upgrade to fix it. It didn't fix it. In fact now both my website and manager display a blank white page.

    I've dealt with this white page after updating in the past, usually by setting path stuff, but all the paths are either correct or now setting themselves based on file location. compress_js and _css and both set to 0. I've made pretty much every file and folder have full permissions just in case (terrible, I know, but I'm more concerned with getting it to work than I am with security right now), I've cleared both browser and site cache, and nothing is having any effect.

    My server is Linux Ubuntu - 14.04.1
    Apache 2.4.7
    Mysql 5.5.37
    Php version 5.5.9

    Notable: I've had to switch hosts about 5 times in the past few months, so there's probably a lot of residual issues from previous configurations. I assume that was what was creating the 'undefined'/access denied issue in the manager in the first place, but until I attempted to upgrade, at least the front-end site was working.

    I'm at a loss. Any suggestions?

    This question has been answered by markh. See the first response.

    • Have you deleted the /core/cache directory contents manually? This shouldn't be necessary but sometimes brute force works. Are you able to see logs in the error log? You can easily SFTP to it at /core/cache/logs/error.log and open it up in a text editor for review. It may also be worthwhile listing the MODX Extras (Snippets/Plugins, ect.) you have installed. It's possible that some that you are using are not compatible with 2.3 which could be compounding your issues.

      All the best,

      Jay
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. BlogTwitterLinkedInGitHub
      • I have found that for almost every upgrade I've done, there were one or two snippets or plugins that I had to remove/reinstall.

        It may be worthwhile to completely replace the /manager/ directory with the same version you are running now, especially if you used FTP to upload the files after unzipping on your computer. It's best to upload the whole .zip file, extract and move files into place as necessary.

        The fork of install.php also works well for upgrading Revo, as long as your server supports allow_url_fopen. To-do: add cURL as a fallback, or perhaps as primary download method.

        https://github.com/sottwell/installer
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 19872
          • 1,078 Posts
          Hey Susan:

          I am more or less in the same boat. Manager that doesn't work on goDaddy. Though, the front end of the site functions fine. I cleaned out everything I could find related to a core services hack. Even downloaded all files and did searches for the various known codes in every file in the site. Is there perhaps another hack going on that noone knows about yet?

          When you say replace the manager? Do I merge the new manager directory with the old or completely delete the old manager directory and put the new directory in it's place. I only ask because I have merged my directories – first after clearing our core services items and updating to 2.3 and then again updating to 2.3.1, and then once more when I tried rerunning the setup for 2.3.1. Still, manager is all wacky and eventually ends up as a blank screen.
          Tree items appear and disappear. Error log returning only two errors consistently:

          [2014-07-24 19:44:34] (ERROR @ /connectors/lang.js.php) Error caching action map mgr/actions
          [2014-07-24 19:44:34] (ERROR @ /connectors/modx.config.js.php) Error caching lexicon topic lexicon/en/core/resource

          Once the screen goes blank, I don't even have to empty the core/cache. If I wait about a minute, I'm able to navigate back to the manager as if everything was normal.

          I am down to only two plugins: TinyMCE 4.3.3 and pdoTools 1.9.2

            • 19872
            • 1,078 Posts
            Question about allow_url_fopen

            My site having trouble has allow_url_fopen turned OFF. When Bob reviewed my site a few days ago, he made mention of it, but did not say whether to turn it on or not —at least I don't think he did. A few posts later he brought the core services hack details to my attention. I might still want to scour my code for any fURL() items.

            Another site on cPanel at goDaddy has allow_url_fopen turned ON. That site works fabulously.

            Could that be the problem? Is it safe to have that turned ON? Clearly it must be because it's on in my cPanel account with the site that functions great.
              • 48440
              • 6 Posts
              Thanks for the replies,

              Quote from: smashingred at Jul 28, 2014, 01:39 PM
              Have you deleted the /core/cache directory contents manually? This shouldn't be necessary but sometimes brute force works. Are you able to see logs in the error log? You can easily SFTP to it at /core/cache/logs/error.log and open it up in a text editor for review. It may also be worthwhile listing the MODX Extras (Snippets/Plugins, ect.) you have installed. It's possible that some that you are using are not compatible with 2.3 which could be compounding your issues.

              All the best,

              Jay

              I did delete /core/cache manually originally.
              I can still read error.log just fine-- it fills up quickly with repeats of this error message:
              [2014-07-29 01:06:46] (ERROR @ /index.php) Error 42S22 executing statement:
              Array
              (
              [0] => 42S22
              [1] => 1054
              [2] => Unknown column 'modContext.name' in 'field list'
              )

              [2014-07-29 01:06:46] (ERROR @ /index.php) Could not prepare context: web
              ...which I'm not really sure what to do with.

              The only plug in I use, to my knowledge, is SPForm.

              Quote from: sottwell at Jul 28, 2014, 04:56 PM
              I have found that for almost every upgrade I've done, there were one or two snippets or plugins that I had to remove/reinstall.

              It may be worthwhile to completely replace the /manager/ directory with the same version you are running now, especially if you used FTP to upload the files after unzipping on your computer. It's best to upload the whole .zip file, extract and move files into place as necessary.

              The fork of install.php also works well for upgrading Revo, as long as your server supports allow_url_fopen. To-do: add cURL as a fallback, or perhaps as primary download method.

              https://github.com/sottwell/installer

              So, I'm not sure if my server supports allow_url_fopen-- how can I check? Nonetheless, I tried running that script and it loaded the package selection just fine. I selected and proceeded and was greeted with another black white page where the url ended in --install.php?modx=revo2.3.0-pl
              Would that be because of the allow_url_fopen thing, or a different problem?
                • 3749
                • 24,544 Posts
                @Amethyst

                AFAIK, the modContext object has a 'name' field in 2.3, but it doesn't in 2.2. Setup is supposed to update the DB to add the new field, but it looks like that didn't happen for you.

                The first thing to check (assuming that you can do so in cPanel on GoDaddy) is whether the database user specified in the config.inc.php file has full rights to the database. If not, change that to full rights and re-run setup.

                You could create the name field manually in the modx_context table in PhpMyAdmin, but if that didn't happen during Setup, maybe some other DB updates also didn't happen. In PhpMyAdmin, for example, look to see if you have a modx_extension_packages table (you should).

                Settings for the name field:

                Column: name
                Type: VARCHAR
                Length: 255
                Collation: (same as the key column)
                Null: checked
                Default: NULL
                All other fields: (blank)

                I'm afraid, though, that fixing the name field will just get you past that error and on to another. I'm wondering if maybe you ran MODX 2.2 setup files on your 2.3 install. OTOH, GoDaddy is somewhat notorious for MODX installs.

                http://bobsguides.com/modx-friendly-hosts.html wink

                There is also an index on that field, but you don't need it.

                Doing this would probably get you past this error.


                  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
                  • 19872
                  • 1,078 Posts
                  Quote from: amethyst at Jul 29, 2014, 05:09 AM
                  So, I'm not sure if my server supports allow_url_fopen-- how can I check?

                  Go to your file manager. Navigate to the php.ini file. Click on it to open it. Then highlight the "no" and type in "yes" (no quotation marks though). Any be careful, the cursor is always a couple of characters away from where it actually inserts your typing.

                  This had no affect on the stability and performance of the manager for me. Currently, goDaddy investigating whitelisting my IP thinking that MODx may be making too many demands causing the server to interrupt and temporarily lock me out for about a half minute or so.

                  This link may be useful for checking compatability of your Extras
                  https://github.com/modxcms/revolution/issues/11630
                    • 48440
                    • 6 Posts
                    Thanks. So my allow_url_fopen was already set to on, and the install.php still produces a white blank page

                    AFAIK, the modContext object has a 'name' field in 2.3, but it doesn't in 2.2. Setup is supposed to update the DB to add the new field, but it looks like that didn't happen for you.

                    The first thing to check (assuming that you can do so in cPanel on GoDaddy) is whether the database user specified in the config.inc.php file has full rights to the database. If not, change that to full rights and re-run setup.

                    You could create the name field manually in the modx_context table in PhpMyAdmin, but if that didn't happen during Setup, maybe some other DB updates also didn't happen. In PhpMyAdmin, for example, look to see if you have a modx_extension_packages table (you should).

                    So this does look to be the case; I lack a modx_extension_packages table. However, the user the config is set up for has ALL privileges on * databases, so that should work fine, yes?

                    To make sure that I am using the right files, I deleted the old setup folder, and uploaded a new setup folder from the modx 2.3.1 zip. Indeed, the setup page listed 2.3.1. I also manually replaced the /manager/ directory again as recommended by sottwell. I then ran upgrade again and it successfully completed, but there has still been no change... I also still lack a modx_extension_packages table.

                    Is there anything besides permissions that might stop modx from being able to access the database?

                    Also, I'm not on GoDaddy; mmcgee is. I'm on an Ubuntu VPS with Digital Ocean (although new to linux and command-line).
                    • Your database user will definitely need to have "create" permissions on the database.

                      The install.php has a check for allow_url_fopen, and it it's not enabled instead of the Install button you'll get a message "Cannot download the files - url_fopen is not enabled on this server."
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org