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

    I developed I site locally and was then asked to install it onto a 1&1 hosting account.
    I uploaded the files and db etc - all fine. But if I try and create a resource, I cannot save it.
    Now can I create a new snippet or chunk.
    Has anyone come across hosting issues with 1&1 and any remedies to the problem?

    Thanks
    Andy
      • 3749
      • 24,544 Posts
      Three possibilities come to mind:

      1. mod_security
      2. A TV that doesn't allow blank that's attached to the resource's template and not filled in
      3. a date_time mismatch involving the modx date_timezone System Setting not matching the PHP zone setting.
        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
        • 51020
        • 670 Posts
        Quote from: BobRay at Feb 01, 2019, 11:55 PM
        Three possibilities come to mind:

        1. mod_security
        2. A TV that doesn't allow blank that's attached to the resource's template and not filled in
        3. a date_time mismatch involving the modx date_timezone System Setting not matching the PHP zone setting.

        Thanks Bob. It’s definitely not 2, but I will check 1 and 3.
        The problem is 1&1 don’t have a control panel as such so difficult to tweak settings.
        Do I need to ask the host to disable mod_security?
          • 51020
          • 670 Posts
          I’ve actually just found a post in the forum that may help. Funnily enough, it was originally posted by me over three years ago!!
          I will see if this solves the problem.

          https://forums.modx.com/thread/?thread=98479&page=2

          Can’t believe I didn’t remember posting this before!!
            • 3749
            • 24,544 Posts
            It happens to me all the time. wink
              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
              • 51020
              • 670 Posts
              Quote from: BobRay at Feb 04, 2019, 08:38 AM
              It happens to me all the time. wink

              haha - glad it's not just me! smiley
                • 51020
                • 670 Posts
                Quote from: BobRay at Feb 01, 2019, 11:55 PM
                Three possibilities come to mind:

                1. mod_security
                2. A TV that doesn't allow blank that's attached to the resource's template and not filled in
                3. a date_time mismatch involving the modx date_timezone System Setting not matching the PHP zone setting.


                So - the timezone fix didn't work after all.
                I ran the setup with this in the index.php file within 'setup':
                @ ini_set('date.timezone', 'Europe/Berlin');
                


                And the installation worked, but I still cannot save resources, and if I create a new chunk, snippet or resource, it gives it the ID of (0) and when I click on them I get the error: 'Chunk not specified.'

                When I imported my database, I did get this error in phpMyadmin:

                Error
                SQL query:
                ALTER TABLE `modx_site_content` ADD FULLTEXT KEY `content_ft_idx` (`pagetitle`,`longtitle`,`description`,`introtext`,`content`)
                MySQL said: Documentation
                
                #1214 - The used table type doesn't support FULLTEXT indexes
                


                I've never seen this error when importing a db from one installation to another - but this could be a red herring?

                So the other thing to check from Bob's comment was:
                1. mod_security

                But not sure what I need to check on this?

                Thanks
                Andy
                  • 51020
                  • 670 Posts
                  In my error log I have this repeatedly:

                  [2019-02-04 14:56:44] (ERROR @ /homepages/XX/XXXXXXXXXX/htdocs/core/model/modx/modx.class.php : 1043) `0` is not a valid integer and may not be passed to makeUrl()
                  


                    • 51020
                    • 670 Posts
                    I tried to turn off mod_security via .htaccess like so:
                    <IfModule mod_security.c>
                      SecFilterEngine Off
                      SecFilterScanPOST Off
                    </IfModule>
                    


                    But this didn't help. But apparently this doesn't always override the hosts settings.
                    The problem is that the host is quite hard to get hold of...
                      • 3749
                      • 24,544 Posts
                      Check the MODX date_timezone System Setting and the PHP timezone setting (I think you'll see it in PhpInfo()). If you have SiteCheck, it will check for mismatches in the date/timezone settings and character set mismatches in the DB.

                      On the MySQL error: https://stackoverflow.com/questions/20964269/1214-the-used-table-type-doesnt-support-fulltext-indexes.

                      I'd suggest upgrading MySQL to at least Version 5.6, (which came out 5 years ago) or higher -- or MariaDB 10 or higher. I think it's unlikely that the MySQL error is causing trouble, but I could be wrong.

                      It's fairly common that only the host can modify mod_security.

                      FWIW: My list of MODX-Friendly Hosts.

                        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