We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46577
    • 54 Posts
    One of my sites was compromised but I was able to manually clean out infected files with the assistance of the hosting company and then upgrade to 2.6.5 without any problems except:

    Entering the url to the manager brings up the login page ok, but upon attempting a login I get the following (I inserted line breaks for readability):

    Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (EST5EDT) at position 3 (5): Unexpected character' in

    /myserver/mydirectory/nnnn/mysite/manager/controllers/default/dashboard/widget.grid-online.php:17 Stack trace: #0

    /myserver/mydirectory/nnnn/mysite/manager/controllers/default/dashboard/widget.grid-online.php(17): DateTime->__construct('EST5EDT') #1

    /myserver/mydirectory/nnnn/mysite/core/model/modx/moddashboardwidget.class.php(246): modDashboardWidgetWhoIsOnline->render() #2

    /myserver/mydirectory/nnnn/mysite/core/model/modx/moddashboardwidget.class.php(118): modDashboardWidgetInterface->process() #3

    /myserver/mydirectory/nnnn/mysite/core/model/modx/moddashboard.class.php(78): modDashboardWidget->getContent(Object(WelcomeManagerController)) #4

    /myserver/mydirectory/nnnn/mysite/manager/controllers/default/welcome.class.php(64): modDashboard->render(Object(WelcomeManagerController)) #5

    /myserver/mydirectory/nnnn/mysite/core/model/modx/modmanagercont in

    /myserver/mydirectory/nnnn/mysite/manager/controllers/default/dashboard/widget.grid-online.php on line 17

    All of those files look ok. I uploaded copies from a clean source and all were identical.

    Otherwise the site is working fine.

    Should I just delete everything and reload the whole site?

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

    • discuss.answer
      • 3749
      • 24,544 Posts
      One way to proceed is to empty the modx_dashboard_widget_placement table in the DB. That won't delete any widgets, but it will remove them from all dashboards so their code won't execute.

      That should let you into the Manager it nothing else is wrong. I would inspect the widget code carefully before putting them back onto the dashboard. You can put them back one at a time to find out which ones are breaking the Manager.

        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
        • 46577
        • 54 Posts
        Excellent.... so it seems to be the "Who's Online" widget

        dashboard widget rank
        1 3 3

        I'm the only user, so not so important and I can leave it out.

        Here's the link for the widget in the dashboard_widget table:

        [[++manager_path]]controllers/default/dashboard/widget.grid-online.php


        Line 17 referred in the error is:

        $datetime = new DateTime($timezone);


        which doesn't seem to be particularly troublesome or tricky? Do I need to set a timezone somewhere perhaps? [ed. note: grogorio last edited this post 5 years, 8 months ago.]
          • 46577
          • 54 Posts
          Ok so I set my default timezone in system settings, re-added the widget placement in the database, and all looks ok now

          Thanks for your help on that Bob
            • 3749
            • 24,544 Posts
            I'm glad you got it sorted. smiley
            Thanks for reporting back.
              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
              • 47118
              • 17 Posts
              I am also getting this exact message following an upgrade install to modx 2.6.5

              I am also getting the following message when I try to go to the actual website


              Your MODX_CORE_PATH is invalid

              In order to install MODX Revolution, you must first locate your core directory that contains the files required to run MODX, including this setup application. The current value specified is not valid and setup cannot continue until this is resolved.
              MODX_CORE_PATH
              ERROR: Your MODX_CORE_PATH is invalid; please specify the correct path in the field above and click Submit.


              I'm at a loss I'm afraid. I have very basic knowledge of working with any of this stuff. Any help would be very much appreciated.

                • 3749
                • 24,544 Posts
                Are you seeing that in setup? If your core directory has been moved or renamed, setup is too dim to find it and you have to tell it where the core directory is. That will happen of you go to yoursite.com/setup.

                If you're not seeing that while running Setup (in other words, you're just going to yoursite.com or yoursite.com/manager), it's possible that your site has been hacked (there's a lot of that going on lately). I would not respond to it in that case.

                If it *is* Setup that's asking, in your MODX root directory (along with the setup, connectors, and manager directories), see if there's a core directory. If not, it's been moved and/or renamed.

                There should be a config.core.php file in the MODX root. If you look in that file, you'll see the definition of MODX_CORE_PATH. You can paste that into the form in Setup.
                  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
                  • 47118
                  • 17 Posts
                  Quote from: BobRay at Aug 11, 2018, 05:54 AM
                  Are you seeing that in setup? If your core directory has been moved or renamed, setup is too dim to find it and you have to tell it where the core directory is. That will happen of you go to yoursite.com/setup.

                  If you're not seeing that while running Setup (in other words, you're just going to yoursite.com or yoursite.com/manager), it's possible that your site has been hacked (there's a lot of that going on lately). I would not respond to it in that case.

                  If it *is* Setup that's asking, in your MODX root directory (along with the setup, connectors, and manager directories), see if there's a core directory. If not, it's been moved and/or renamed.

                  There should be a config.core.php file in the MODX root. If you look in that file, you'll see the definition of MODX_CORE_PATH. You can paste that into the form in Setup.

                  I'm receiving this message after running the setup, when I try to go to the webpage itself.
                  I'm getting the other message when I try to login to the manager.
                    • 3749
                    • 24,544 Posts
                    First, check the values for MODX_CORE_PATH in the config.core.php files in the MODX root, connectors, and manager directories.

                    Also check the values in the core/config/config.inc.php file.

                    If you don't see anything wrong there, I would also download a new copy of the same version of MODX, unzip it somewhere, and compare the index.php files in the modx root and manager folders with the ones on your site to see if there's any suspicious new code in the ones on your site.

                    Also, make sure there's no index.html file in the MODX root directory or the manager directory.



                      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