We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31902
    • 342 Posts
    I just noticed something on several MODx installs (various recent versions) that I never noticed before. On all the pages that are unpublished, you can still view them on the frontend by going to them directly through the browser address bar. Are you supposed to be able to do this? I would think an unpublished page would result in a page not found error or something.

    What gives?
      • 43550
      • 26 Posts
      Hi,

      I have just tested this and you are right. This is not expected behaviour as search engines will show links to older pages if they have been indexed previously. So if you unpublish a page you do not expect it to be available via a url.

      Good spot.

      I am sure there will be a simple solution and that this is either an oversight or is something we are both not quite implementing properly. I will look into it myself but am still fairly new to MODX so I am guessing someone else with more experience will find the solution before me.

      Best wishes

      Paul.


      EDIT: Have just checked the database and the site_content table is being updated when you unpublish a page. The 'published' column is being updated from 1 (published TRUE) to 0 (published FALSE). So the manager does not seem to be at fault. [ed. note: pauld123 last edited this post 13 years, 5 months ago.]
        • 31902
        • 342 Posts
        Thanks, pauld123 for responding and following up with a test.

        I can't believe that after all the sites I built with MODx, this is the first time I've spotted this. None of our clients have complained about it, either. However, these are pages that I don't want anyone to see, for various reasons, or to have the search engines index.
          • 3109 ☆ A M B ☆
          • 894 Posts
          Make sure you are logged out of the manager and clear your browsers cache, then try checking to see if the page displays I just tried it and it does not so not sure what your issue might be.
            Benjamin Marte
            Interactive Media Developer
            Follow Me on Twitter | Visit my site | Learn MODX
            • 43550
            • 26 Posts
            Ah, I knew it must be something simple!!!

            It is working! As soon as I log out the back end the pages are no longer published. In fact being able to see unpublished pages when I am logged in is actually a development bonus!!!!

            Thanks Benmarte,

            Best wishes,

            Paul.
              • 31902
              • 342 Posts
              Quote from: benmarte at May 09, 2013, 09:28 AM
              Make sure you are logged out of the manager and clear your browsers cache, then try checking to see if the page displays I just tried it and it does not so not sure what your issue might be.

              You're right! As long as I'm logged into the backend, I can see unpublished items in the frontend. But, upon logging out, the page defaults to a page not found page. Interesting.

              I wonder how the search engines will treat this. I assume they will treat it as a page not found (existing) thing, I guess.

              Thanks, benmarte.
                • 3109 ☆ A M B ☆
                • 894 Posts
                It treats it as a non-existent page you should also be submitting your sitemap.xml to search engines which will tell it what it needs to look for to make it easier for them.

                Good luck.
                  Benjamin Marte
                  Interactive Media Developer
                  Follow Me on Twitter | Visit my site | Learn MODX