We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    Man, seems like the whole app is broken. Anyone else having trouble with 2.2.4-pl? All my Snippets broke. Upon inspection, the $scriptProperties array was being passed incorrectly:

    Printing the array showed that #38; (the ampersand) was appended to the parameter names:

    Array ( [actionKey] => service [contexts] => [errTpl] => lgnErrTpl [errTplType] => modChunk [loginKey] => login [loginMsg] => [loginResourceId] => 0 [loginResourceParams] => [loginTpl] => lgnLoginTpl [logoutKey] => logout [logoutMsg] => [logoutResourceId] => 0 [logoutResourceParams] => [logoutTpl] => lgnLogoutTpl [postHooks] => [preHooks] => [recaptchaTheme] => clean [redirectToOnFailedAuth] => [redirectToPrior] => [rememberMeKey] => rememberme [toPlaceholder] => [tplType] => modChunk [#38;loginTpl] => lgnLoginTpl [#38;logoutTpl] => lgnLogoutTpl [#38;errTpl] => lgnErrTpl [#38;loginResourceId] => 163 [#38;logoutResourceId] => 164 )


    So my dirty fix was to put something like this into the Snippets:

    foreach($scriptProperties as $k => $v) {
        $new_k = preg_replace('/^#38;/','',$k);
        $scriptProperties[$new_k] = $v;
        unset($scriptProperties[$k]);
    }


    Anyone know what's going on? Surely a goof this big did not make it through QA? Is this something with my environment (e.g. ModSecurity)?

    PHP 5.3.10
    5.0.95-community-log
      • 3749
      • 24,544 Posts
      Everett, I'm not seeing that in my 2.2.4 installs. I wonder if you have a corrupted MODX file somewhere or a file that didn't get overwritten in the upgrade.

      I assume that you've tried logging out, deleting all files in the core/cache directory, and clearing your browser cache and cookies.



      ------------------------------------------------------------------------------------------
      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
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        Yeah. Ugh this is killing me. Reinstalling did not help. Is it the build-script or something? [ed. note: Everettg_99 last edited this post 14 years, 4 months ago.]
          • 3749
          • 24,544 Posts
          I don't know what would do that. The only things I can think of are TinyMCE mangling the tags (which would only be the case for resources with richtext checked), or some renegade plugin (especially a syntax highlighter plugin or something similar).



          ------------------------------------------------------------------------------------------
          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
            • 9207 ☆ A M B ☆
            • 2,475 Posts
            I removed the codemirror package, but the results are the same. Everything is broken. This thing was supposed to go live tomorrow.

            Not only are the $scriptProperties keys messed up, the values are too:

            [2012-06-21 00:38:40] (ERROR @ /index.php) [Login] Could not find hook "`campaign_monitor_add_subscriber`<br />".

              • 3749
              • 24,544 Posts
              I wish I could help. The only things I can think of to try are disabling *all* plugins, and if that doesn't work, clear the cache, flush all sessions, log out, delete all files in core/cache, clear browser cache and cookies again, re-download 2.2.4, and be sure *not* to use FTP to tranfer the files to the site, then run Setup.

              You could also double check all the paths in core/config/config.inc.php and all the config.core.php files.



              ------------------------------------------------------------------------------------------
              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
                • 9207 ☆ A M B ☆
                • 2,475 Posts
                Thanks Bob. Yeah, I did those steps last night, sans the path check... but it was working before the upgrade. I used wget to retrieve the package directly to the server. Now that I've slept on it, I'm going to do a clean install of 2.2.4 (not an upgrade) and see if the behavior persists... if yes, I'll track it down in the code. If not, I'll start importing content table by table and see if and when it wonks out. o_O
                  • 9207 ☆ A M B ☆
                  • 2,475 Posts
                  Ok, doing a clean install and then re-installing ALL packages via package manager fixed things. Then I re-imported the old database (the whole thing), copied in the assets I needed, and then everything worked!!! I still have no idea what caused that colossal cluster. [ed. note: Everettg_99 last edited this post 14 years, 4 months ago.]
                    • 3749
                    • 24,544 Posts
                    I'm glad you got it sorted. smiley



                    ------------------------------------------------------------------------------------------
                    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