We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Just installed on a 2.2.7-dev install without any problems. Sounds like it's encountering some fatal error while trying to save - check the error log and using Dev tools / Firebug inspect the request to connector.php when you hit save. Probably a PHP error in the response.
      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
      • 1841
      • 141 Posts
      Hi Mark,

      Thanks for the quick reply. There aren't any errors showing in the error log, using the Firefox debugger it comes up with:
      SyntaxError: missing ) in parenthetical
      and just hangs saying saving...

      It's 2.2.7-pl that I am using. Tried on a clean install on 2.2.7 and still the same although installing on a 2.2.0 install and then upgrading to 2.2.7 afterwards works ok. [ed. note: antsplace last edited this post 11 years ago.]
        • 1841
        • 141 Posts
        Looking into this further Firefox debug is reporting that the missing ) is in ext-all.js

        The strange thing is that I have a site that's been on Modx since Revo went pl and now uses 2.2.7-pl and Client Config works fine however installing modx revo 2.2.7-pl on a sub-domain of this website and then installing Client Config results in the same issue - as the sub-domain is on the same server it's got to be an issue with revo 2.2.7-pl?

        Any help would be most appreciated.
          • 34109
          • 119 Posts
          Hey Mark,

          Having a hard time getting ClientConfig to work. I can set values no problem, but when I retrieve them from a snippet, or from within a chunk or template the value isn't returned. If the key is the same as a system setting, it returns the system setting. I'm using 2.2.7. Any ideas what could be up with it?

          Thanks,

          Chris
            Studio Republic
            http://www.studiorepublic.com
            0845 226 3205
            @christodhunter
          • @antsplace: using Firebug, inspect the AJAX request to connector.php in the Network tab when you hit save and paste the response of that here.

            @Chris: how are you retrieving them? Are the values you expect in the cache file in core/cache/system_settings/clientconfig.cache.php?
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 34109
              • 119 Posts
              Hey Mark,

              Yes - cache is correct and a manual clearout of the cache folder got it working for normal pages. I'm generating invoices on the fly from a page which loads outside of the manager so manually loads in the api like this:

              require_once dirname(dirname(dirname(dirname(__FILE__)))).'/config.core.php';
              require_once MODX_CORE_PATH.'config/'.MODX_CONFIG_KEY.'.inc.php';
              require_once MODX_CONNECTORS_PATH.'index.php';
              


              I'm then setting placeholders like this:

              $modx->setPlaceholder('invoicesignoff',$modx->getOption('invoicesignoff'));
              


              The plugin is firing when this script is loaded but either the setting isn't loading if it just exists in clientconfig, or the system setting takes priority.

              Cheers,

              Chris
                Studio Republic
                http://www.studiorepublic.com
                0845 226 3205
                @christodhunter
              • Actually, when including the connector, it doesn't trigger the plugin so it doesn't set the options. First reported here and a quick "fix" is to invoke the OnHandleRequest event as noted by Jan: https://github.com/Mark-H/ClientConfig/issues/44

                  Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                  Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                  • 1841
                  • 141 Posts
                  Hi Mark,

                  I tried adding the line to the connector.php but it didn't help. I did as you suggested and the response was
                  A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again.

                  I've set the folder and files to 777 and it hasn't made the slightest difference. The site which this does work with is hosted on the same server and has the same folder permissions, the only difference being it has been upgraded to 2.2.7-pl and has been running on revolution since 2.0-pl - which means it has a few different system settings but replicating these don't seem to help either.
                    • 34109
                    • 119 Posts
                    Thanks Mark - added the line below and it works perfectly now.

                    $modx->invokeEvent('OnHandleRequest');
                    
                      Studio Republic
                      http://www.studiorepublic.com
                      0845 226 3205
                      @christodhunter
                    • Quote from: antsplace at Apr 22, 2013, 11:32 AM
                      Hi Mark,

                      I tried adding the line to the connector.php but it didn't help. I did as you suggested and the response was
                      A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again.

                      I've set the folder and files to 777 and it hasn't made the slightest difference. The site which this does work with is hosted on the same server and has the same folder permissions, the only difference being it has been upgraded to 2.2.7-pl and has been running on revolution since 2.0-pl - which means it has a few different system settings but replicating these don't seem to help either.

                      Adding the line to connector.php was meant for Chris.

                      This was for you @antsplace:

                      Quote from: markh at Apr 22, 2013, 10:55 AM
                      @antsplace: using Firebug, inspect the AJAX request to connector.php in the Network tab when you hit save and paste the response of that here.

                      I want to know the response of the AJAX request that gets sent to connector.php when you hit Save within ClientConfig. If you get the response "A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again" when you hit save within ClientConfig, that would mean that the permissions on any of the following files or ANY of the directories they are in is wrong:

                      - assets/components/clientconfig/connector.php
                      - core/components/clientconfig/processors/mgr/settings/save.class.php (going from memory here; may be named slightly differently)

                      If setting file permissions to 0777 and directory permissions to 0666 throws that error, you may be running phpsuexec which means the maximum permissions are 0755 and 0644 respectively. If you can't figure out the right permissions, I suggest checking out the install that does work to see what permissions that uses.

                      Either way, it sounds like a server and not a ClientConfig / MODX 2.2.7 issue to me.
                        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.