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

    I recently came across MODx and decided to give it a whirl but I cannot for the life of me get it to save Chunks or Snippets.

    I can create and save them without "Chunk code (html)" or "Snippet code (php)" but as soon as I add html or php they WILL NOT save at all.

    What does work:
    Chunks: saving simple text. Saving this <div>
    Actually saving this works: <div>any character here will work</div> or like this:

    <div>
    any character here will work
    </div>


    What does not work:
    Saving this - <div></div> or any html or php code (snippets only)

    This will not work:

    <div>
    <div>any character here</div>
    </div>


    Error Log from this mornings installation:

    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not copy /home/testserver/public_html/modx/core/packages/core/modContext/bb0ab31ff60c6076faf4e52380d863d4/0/ to index.php
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not copy /home/testserver/public_html/modx/core/packages/core/modContext/bb0ab31ff60c6076faf4e52380d863d4/1/ to ht.access
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not copy /home/testserver/public_html/modx/core/packages/core/modContext/4d43e647705a21a39cce4e206eae2fc4/0/ to assets
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not copy /home/testserver/public_html/modx/core/packages/core/modContext/4d43e647705a21a39cce4e206eae2fc4/1/ to controllers
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not copy /home/testserver/public_html/modx/core/packages/core/modContext/4d43e647705a21a39cce4e206eae2fc4/2/ to templates
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not copy /home/testserver/public_html/modx/core/packages/core/modContext/4d43e647705a21a39cce4e206eae2fc4/3/ to ht.access
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not copy /home/testserver/public_html/modx/core/packages/core/modContext/4d43e647705a21a39cce4e206eae2fc4/4/ to index.php
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not install files from /home/testserver/public_html/modx/core/packages/core/xPDOFileVehicle/788c3d8c5ceea2081e0e45beea59445c/ to 
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not install files from /home/testserver/public_html/modx/core/packages/core/xPDOFileVehicle/cfb6e044acfd4380af21297330d6e10a/ to 
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not install files from /home/testserver/public_html/modx/core/packages/core/xPDOFileVehicle/4ad20f2590e41758af884f8f50cf9e90/ to 
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not install files from /home/testserver/public_html/modx/core/packages/core/xPDOFileVehicle/c9366179780330a60397dc65652071a9/ to 
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not install files from /home/testserver/public_html/modx/core/packages/core/xPDOFileVehicle/70496e8c8b2f20b1a5475b6a53d8ae08/ to 
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not install files from /home/testserver/public_html/modx/core/packages/core/xPDOFileVehicle/62dfa0c3aa4f49d0842fcd1e508daddb/ to 
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not install files from /home/testserver/public_html/modx/core/packages/core/xPDOFileVehicle/d095a33f0877ac62fc7e084c26b68f9b/ to 
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not install files from /home/testserver/public_html/modx/core/packages/core/xPDOFileVehicle/479db3a211064595e3407956f5d5e1bc/ to 
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not install files from /home/testserver/public_html/modx/core/packages/core/xPDOFileVehicle/f33b0387efe09cd9b3c233b2d05ca7e0/ to 
    [2010-08-24 09:56:53] (ERROR @ /modx/setup/index.php) Could not install files from /home/testserver/public_html/modx/core/packages/core/xPDOFileVehicle/6d1e6577b5c6677358691d2ad56ad8e1/ to 


    Your assistance would be greatly appreciated.

    TIA.

    Web Server:

    * PHP Version 5.2.13 - CGI
    * Apache
    * Operating System and version: Linux 2.6.18-164.11.1.el5 #1 SMP x86_64

    Database:

    * MySQL version: 5.0.91
    * List of any tables over 1MB in size

    MODx:

    * Version: MODx Revolution 2.0.0-pl
    * Any changes you’ve made: None - Clean Install
    * Any snippets you’re running on the page that is not working properly: None as I can’t save them!
    * Any plugins you’re running: None - Clean Install.

    Browser/Client:

    * Firefox V3.5.7 & IE8 V8.0.6001.18702
    * Operating System and version: Windows XP Pro SP3
      • 19633
      • 6 Posts
      Is this just happening to me.... undecided
        • 19633
        • 6 Posts
        WOW 105 views and no-one appears to be having the same issue. I’ll try a new servrr to install to then!
          • 26903
          • 1,336 Posts
          This is usually something to do with modsecurity, see this thread http://modxcms.com/forums/index.php?action=printpage;topic=53163.0
            Use MODx, or the cat gets it!
            • 19633
            • 6 Posts
            Well I installed on a test server at home and it saves chunks and snippets, so this leads me to believe that it could be the php.ini file which I do not have access to.
              • 3749
              • 24,544 Posts
              It’s almost certainly mod_security messing with you. There’s more info here: http://wiki.modxcms.com/index.php/What_is_mod_security_and_how_does_it_affect_me
                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
                • 19633
                • 6 Posts
                Thanks for your assistance with this one Bob.

                I have added the line SecFilterEngine On to the .htaccess file in the Modx manager directory and received a:

                Internal Server Error (error 500)

                The server encountered an internal error or misconfiguration and was unable to complete your request.

                Adding SecFilterScanPOST Off produces the same error.

                Adding SecFilterEngine Off produces the same error.

                And I cannot save that last snippet as I cannot save snippets either!

                I will now raise a ticket with my hosting provider.

                Thanks for the help.
                  • 19633
                  • 6 Posts
                  Just to let any readers know that this has now been solved.

                  I contacted the hosting provider and they set up an exclusion so that my sites can now save data in Chunks & Snippets. It must have been mod security which could not be bypassed using the .htaccess or localised php.ini files.

                  I’m now cooking with gas, or so they say!

                  Thanks for your assistance Bob.
                    • 3749
                    • 24,544 Posts
                    Glad you got is sorted. Thanks for reporting back.
                    Welcome to MODx 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
                      • 10529
                      • 73 Posts
                      Just to say I’ve started having exactly the same problems with my new & existing sites - have tried to create a Maxi Gallery snippet and it will not save it - then tried to duplicate an exitsing snippet on both a new and existing site and those too would not save.

                      I’ll contact my hosting tech guys http://www.knethosting.co.uk/ who usually are pretty quick on sorting this - just wondering if there was some security patch that has been installed that is creating these issues.