We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27444 ☆ A M B ☆
    • 117 Posts
    Hi,

    I am finding a most peculiar problem on MODX Evo 1.0.15. Basically, I have a website which when I save a Resource, Chunk, Snippet or anything else within the Manager, a 404 message is output in the display area (next to the left menu and under the top menu).

    Also, when I click on preview resource, the page loads but the URL is showing with the query string (ex. domain.com/index.php?id=55) instead of with the alias. When I do enter the alias (ex. domain.com/alias), the page redirects to the 404 page.

    Checked the Mod_Security log and not showing any alert from its end.

    The htaccess file is present and hold the following:

    # For full documentation and other suggested options, please see
    # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
    # including for unexpected logouts in multi-server/cloud environments
     
    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /
     
    # Fix Apache internal dummy connections from breaking [(site_url)] cache
    RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
    RewriteRule .* - [F,L]
     
    # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
    #RewriteCond %{HTTP_HOST} .
    #RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
    #RewriteRule (.*) http://www.example.com/$1 [R=301,L]
     
    # Exclude /assets and /manager directories from rewrite rules
    RewriteRule ^(manager|assets) - [L]
     
    # For Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
     
    # Reduce server overhead by enabling output compression if supported.
    #php_flag zlib.output_compression On
    #php_value zlib.output_compression_level 5
    


    Anyone with tips on how to solve this? smiley

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

      Steven James McLean
      Tech Lead
      springbokagency.com
      • 9995
      • 1,613 Posts
      Works when I replace the .htaccess with mine.

      My settings:
      Use FriendlyURLs -- Yes
      Friendly URL Prefix -- Empty
      Friendly URL Suffix -- Empty
      End Container URL with Slash -- No
      Use SEO Strict URLs -- No
      Use Friendly URL aliases -- Yes
      Use Friendly URL alias path -- Yes
      Allow duplicate URL aliases -- No
      Automatically generate URL alias -- Yes

      there is no .htaccess in my manager folder.
      only ht.access [ed. note: fourroses666 last edited this post 11 years, 8 months ago.]
        Evolution user, I like the back-end speed and simplicity smiley
        • 27444 ☆ A M B ☆
        • 117 Posts
        Hi fourroses666,

        Thank you for the reply - my settings within the MODX configuration are exactly like yours, but still have the same problem :/
          Steven James McLean
          Tech Lead
          springbokagency.com
          • 9995
          • 1,613 Posts
          Tried other browsers?
          Maybe reupload 1.0.15 will help :S I have no clue
            Evolution user, I like the back-end speed and simplicity smiley
            • 27444 ☆ A M B ☆
            • 117 Posts
            I tried other browsers, but it seems to be a server-side problem so not really affecting.

            Yes, shall retry to re-install Evo 1.0.15 and check.
              Steven James McLean
              Tech Lead
              springbokagency.com
              • 27444 ☆ A M B ☆
              • 117 Posts
              I have re-installed Evo 1.0.15 - no problem there.

              The problem re-occurs when I re-import the site_content table.

              When done and I save a resource, it starts showing a 404 Error when index.php?a=30 is called.
                Steven James McLean
                Tech Lead
                springbokagency.com
                • 9995
                • 1,613 Posts
                When I place the ?a=30 no page is loaded, not found message. Dunno what should be loaded.
                A possible CSRF attempt was detected. No referer was provided by the server.

                As if there is something corrupt in de database.
                Maybe recover the db tables I have no other ideas atm.
                  Evolution user, I like the back-end speed and simplicity smiley
                • discuss.answer
                  • 27444 ☆ A M B ☆
                  • 117 Posts
                  After extensive debugging I found the issue.

                  In the site_content table I found two resources which where parent and child of each other.

                  Ex. Resource 15 had the 'parent' field set to 16, and resource 16 had the 'parent' field set to 15.

                  Set the 'parent' field to 0 so that I take them out of the hierarchy and then re-moved them again as required from within MODX.
                    Steven James McLean
                    Tech Lead
                    springbokagency.com