We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7966
    • 90 Posts
    I have 3 contexts, and when I try to preview an unpublished page from manager, it works only for the second context but not for others.

    It gives a "Page not found" error for other contexts.

    I can also view an unpublished page for second context when viewed from another browser although not logged in to manager.

    I use MODx Revolution 2.0.4-pl2 version.

    I suppose, you must be able to preview an unpublished page from manager but not when viewed directly. Is this how it should work? if yes, any ideas what could be the problem in this case?

    Thank you
      • 7966
      • 90 Posts
      I have moved the websites to a new server and updated to the latest revolution version. But the problem is still there.

      You can not preview a page unless you mark is as published at some of the context.

      There are now 4 contexts. Original "web" context and the second context that I added display the preview without any problem.

      Third and fourth ones gives the following page

      Page not found
      
      The page you requested was not found.
      


      This is a one user process, which is the admin trying to preview the page from manager.

      I need to add several pages and test them before publishing but not possible.

      Should I report this as a bug?
        • 18373 ☆ A M B ☆
        • 3,141 Posts
        How did you set up the contexts? Are they on different domains, subdomains, folders? If on different domains, what domain is your manager on?
          Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

          Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
          • 7966
          • 90 Posts
          Thanks Mark for the response. The structure is as follow.

          modx manager is on www.domainA.com. context is the default web context. Preview works.

          Second domain is on a different folder, and a different domain, www.domainB.com. Preview works.

          Third domain is on a different folder, and a different domain, www.domainC.com. Preview doesn’t work.

          Fourth domain is on a different folder, and a different domain, www.domainD.com. Preview doesn’t work.

          There is no subdomain.

          I redirect the website changing the code ($modx->initialize(’domainB’);) in index.php in each domains separate folder.







            • 3749
            • 24,544 Posts
            Do the contexts that work have any context settings that the others don’t (check the spellings of the context settings, too) ?

            Each context should have the following context settings (on the Settings tab when editing the context):

            site_url
            base_url
            site_start
            http_host
              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
              • 7966
              • 90 Posts
              Sorry for late response. I didn’t have connection for last few days.

              All contexts have all the 4 settings, and some extra ones. This looks to be the only problem. Other things works okay.