We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16263
    • 4 Posts
    Just installed a fresh copy of 2.2.0-pl2, started building out a few templates.

    I have a Homepage template (the original BaseTemplate), and a Subpage template. I created a Home document, left the Homepage template selected and it works as expected. I created a Subpage document, applied the Subpage template, pressed 'OK' on the warning, the page refreshed, and the homepage template is still selected.

    Repeating the process, I noted a few errors in the console.

    In Chrome 16.0.912.63, after pressing the 'OK' button I receive:
    Uncaught TypeError: Cannot set property 'leaf' of undefined index.php:49

    In Firefox 8.0.1:
    POST http://kbv2.staplegun.us/connectors/resource/index.php?action=getNodes&id=web_0&type=modContext
    POST http://kbv2.staplegun.us/connectors/resource/locks.php
    POST http://kbv2.staplegun.us/connectors/resource/locks.php

    In Firefox, if I stop the page immediately after the errors appear, I can then press the 'Save' button and the changes are successful.

    I'm receiving similar errors in the console when using out drop-down boxes, but the changes are saved successfully.

    Any thoughts?
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      I just posted with a similar issue, however I am able to change templates on new resources just fine. I get no error messages in Chrome, it just doesn't work. Page changes save ok as well. I haven't tried with Firefox (I've been avoiding it lately, makes my cpu heat up too much).




        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 22303 MODX Staff
        • 10,725 Posts
        Make sure your date.timezone setting in PHP matches that used by your MySQL Server configuration. If it does not, you are going to have trouble. If you cannot change your php.ini, you can set the date_timezone setting inside MODX to the proper PHP timezone string that matches the timezone being used by MySQL. See http://php.net/manual/en/timezones.php for valid timezones for PHP.

        IMO, all PHP servers should be configured with the appropriate date.timezone value, matching that used by your MySQL client (or any date-aware data source client you might use with PHP).
          • 10208 ☆ A M B ☆
          • 1,780 Posts
          Thank you! That worked :~}
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 16263
            • 4 Posts
            Perfect solution, within an hour.

            Thank you!
              • 10208 ☆ A M B ☆
              • 1,780 Posts
              Are you able to save the resource after changing the template? I'm not able to do so unless I make a character change (i.e. space+delete) in a field, which then makes the save option available.

                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 15734
                • 70 Posts
                I set an install of 2.2.0 pl2 to my local timezone and then couldn't change any templates. I set it back to UTC as the server has no value set. I still can't change any templates. Anybody have any ideas?
                Does this affect any other components in Modx?
                  • 22303 MODX Staff
                  • 10,725 Posts
                  You have to set it to the timezone being used by your MySQL server.
                    • 37912
                    • 12 Posts
                    My MySQL server timezone was SYSTEM (I believe that's the default, this is just a dev environment). And php is set to America/Chicago. So I explicitly set my timezone in MySQL to America/Chicago, and I also set date_timezone in MODx to America/Chicago.

                    I'm still experiencing this issue.

                    The only error I'm seeing the Chrome console is:

                    Uncaught Error: Too much time spent in unload handler.
                    getTimeOverride v8/DateExtension:1
                    Ext.extend.sleep modx.js:156
                    Ext.KeyMap.key update.js:44
                    I ext-all.js:7

                    I've attached screen shots of the errors I'm getting in FF.

                    Thanks,

                    Tony
                      • 22303 MODX Staff
                      • 10,725 Posts
                      The timezone for MySQL will be in a different format from the valid PHP timezone strings. Do not set MySQL to America/Chicago; it needs a value in the number of hours difference from UTC, e.g. "-4:00", "+6:00", "+10:30", etc. If you system is set correctly, the "SYSTEM" value in MySQL should be fine. Just change the PHP date.timezone value to the appropriate timezone (America/Chicago, if that's what your machine is using).