We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37380
    • 20 Posts
    ModX 2.4.2

    While logged in to the manager I can't preview unpublished pages despite having super admin rights. Instead, I get redirected to the 404 page.

    These pages are made of plain HTML, no Login snippets or any other kind are called.

    The System Error Log doesn't report anything at all either.

    I wonder if this is the new default behavior of the latter ModX versions.

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

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      No, as long as your user's group has "view_unpublished" permission you should be able to see unpublished resources.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 37380
        • 20 Posts
        The User belongs to the "Administrator" group which has this permission and also the user has the "sudo user" checkbox marked.

        I've cleared the cached and flushed all permissions and, yet, no luck.
          • 3749
          • 24,544 Posts
          Do you other front-end contexts in addition to the 'web' context?
            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
            • 37380
            • 20 Posts
            No other contexts.

            Although some other type of users have restricted access to some resources groups?

            Thanks Scott & Bob for looking into this.
            • discuss.answer
              • 37380
              • 20 Posts
              Found the issue.

              My environment is set to accept multiple domains and the server had domain A set as default whereas ModX had domain B as default. As a result, whenever I tried to preview an unpublished page, ModX didn't recognize me as an authenticated user and thus redirect me to the 404 page.
                • 32507
                • 142 Posts
                Hi,

                I have also same problem. I have multible contexts. I can preview all other contexts except web-context?

                @Bob-Ray. What you mean by this?
                Do you other front-end contexts in addition to the 'web' context?
                  • 3749
                  • 24,544 Posts
                  Sorry, I don't know how else to say that. If you have multiple contexts, I think the answer is yes. wink

                  The only cause I can think of is that the user you are logged on as doesn't have view_unpublished permission in the Policy attached to the Context Access ACL entry that gives them rights to the 'web' context.

                  I hope that makes sense.

                    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
                    • 32507
                    • 142 Posts
                    Hi,

                    Problem solved. I'm not sure why though smiley
                    I was logged in also as a frontend user (Login snippet). After logging out frontend, preview works.
                      • 3749
                      • 24,544 Posts
                      It's the credentials of the front-end user that count, so maybe that user doesn't have preview_unpublished permission for the context of the Resource you were viewing, but the Manager user does.
                        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