We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8822
    • 203 Posts
    Hi there,

    All of a sudden our resources are getting stuck in a 'saving' loop when we try to save them and you have to close the browser to get out of the loop. The change/update however is still applied to the resource in question. I have tried creating a resource with no template, no template variables, no chunks and just the word test as the name and it still gets stuck in a loop. Saving a chunk however works fine.

    There are a number of errors in the error.log file, though not sure whether these are related:

    [2016-10-04 17:48:25] (ERROR @ <path>/core/cache/includes/elements/modplugin/6.include.cache.php : 55) PHP warning: unlink(<path>/assets/components/xfpc/cache/): No such file or directory
    
    [2016-10-04 17:48:25] (ERROR @ <path>/core/cache/includes/elements/modplugin/6.include.cache.php : 53) PHP warning: readdir() expects parameter 1 to be resource, boolean given
    


    We are using Revolution 2.2.4. Does anyone have any ideas? This is a real problem for us and has been working perfectly for years?

    Many thanks

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

    [ed. note: Emily last edited this post 9 years, 11 months ago.]
      • 3749
      • 24,544 Posts
      I'd suggest downloading the UpgradeMODX extra and upgrading to 2.3.0, then 2.4.0, then 2.5.0, then 2.5.1. The version you have is not secure. I suspect that the problem is cache corruption, which was an issue with the 2.2.x versions. Upgrading with UpgradeMODX will also clear the cache for you.

      Be sure to back up the site first (both files and DB), but manually delete all files in the core/cache directory before backing up the files.
        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
        • 8822
        • 203 Posts
        HI BobRay,

        Thanks for the response. My mistake though, a typo! I meant to type 2.4.4, we did a big upgrade a couple of months back, with the help of your UpgradeMODX extra.

        Any other suggestions or ideas?

        If it is a corrupted cache, would deleting the cache manually not sort the issue?

        After some research, i have found that if i manually delete the cache it will 'sometimes' let me save a resource, but as soon as i update a Template Variable for a resource and then save it get stuck in the save loop again and then i am unable to save anything going forward until i manually delete the contents of the core/cache directory. This has only been the case a couple of times mind, so not always the case.

        Is there something else i should be deleting? Any ideas what the error messages mean in the log?

        Thanks for your help
          • 8822
          • 203 Posts
          I actually think that this is related to xFPC. If i clear the cache from the MODX Dashboard, i receive the same errors as those above:

          [2016-10-04 17:48:25] (ERROR @ <path>/core/cache/includes/elements/modplugin/6.include.cache.php : 55) PHP warning: unlink(<path>/assets/components/xfpc/cache/): No such file or directory
           
          [2016-10-04 17:48:25] (ERROR @ <path>/core/cache/includes/elements/modplugin/6.include.cache.php : 53) PHP warning: readdir() expects parameter 1 to be resource, boolean given
          


          I read on the xFPC user manual that 'If you save a resource (whether or not you have the 'clear cache' check set) it will also clear the xFPC cache' - so perhaps it is unable to clear this cache and this is what is causing the issue

          Has anyone experienced anything similar?
            • 40492
            • 7 Posts
            I've seen this behaviour which in the past has been down to the security settings in place with my hosing company. With trial and error they sorted it.

            However with my upgrade to the most recent version (2.5.1) I'm unable to edit pages (blank screen), or create a working user account for the hosting company to login with (user admin shows successful log ins but at the client side it's reverting to a login screen with no error).

            Looking back, the hosting company said

            "That IP is not blocked, however it dd trigger a Modsec rule hit. I have exempted the domain from that particular rule.

            Note that Modsec rules can be a chain of rules, not just a single one, so it is possible that other rules may be triggered, and we may have to go through this process of finding the rule and exempting
            several times. If you get locked out again please let us know and we can check for further rule hits."

            One of the issues included login from some users.





            [ed. note: david000 last edited this post 9 years, 11 months ago.]
              • 3749
              • 24,544 Posts
              mod_security is definitely a likely suspect. Another possibility is a mismatch between the date_timezone System Setting and the setting in php.ini and/or .htaccess. SiteCheck will test this for you if you don't have access to the php.ini file.
                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
              • discuss.answer
                • 8822
                • 203 Posts
                I found that my issue was because during a recent restore by the host, the system had timed out and not copied across all the relevant files - some of the files for the xfpc extra were missing. Reinstalling the extra sorted out the issues. xfpc clears it's cache after saving a resource, hence the issue with the resource saving but the page getting stuck in a 'save loop'.

                Thanks for everyones comments and help
                  • 3749
                  • 24,544 Posts
                  I'm glad you got it sorted. Thanks for reporting back. smiley
                    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