We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23018
    • 353 Posts
    Hi,
    I have a MODX installation (2.5) with multiple domains (http://domain1.com, http://domain2.com, etc), each one with a different context (domain1.com, domain2.com).

    Context routing is done by Gateway Manager and works perfectly.

    The manager login is in its own domain (http://manager.example. com/admin/ ).

    I have a dedicated administrator with access to all contexts as well as dedicated users for each domain/context.

    Each user has its own individual User Group, with Context Access for mgr and one other context (Super User - 0, Administrator).

    So far it is not possible to view unpublished resources if they are located outside the web context. Each attempt returns the error page of the context in question.

    The admin can see unpublished resources in the web context (he has access to all contexts), but he can't view them in any other context.

    The dedicated context users can't see unpublished resources in their own contexts.

    Searching the forum, gave some clues, but no solution so far:

    I've found an old post by where he advised to use a session_cookie_domain setting to accomplish this (https://forums.modx.com/thread/31157/preview-of-unpublished-document-not-working-in-new-context#dis-post-168628) It was a generic one for subdomains but I thought that adding this setting to a context might help to solve the problem too.

    I might be missing something obvious here, but I'm stuck.

    Any ideas?

    Cheers,

    pepebe [ed. note: pepebe last edited this post 10 years, 1 month ago.]
      Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
      • 23018
      • 353 Posts
      Update: I really don't get the technical details of the problem.

      If somebody can give a hint whats going on, I can work from there to find a solution.

      Cheers,

      pepebe
        Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
        • 577
        • 132 Posts
        Be sure you are logged into Manager under that context.

        Ex: If your context is someotherdomain.com and your http_host value in the context setting in “someotherdomain.com" then you dont have the cookies set … and you are technically not logged in as manager to see it
        I do alot of multi context stuff and this trips me up all the time

        So go to http://someotherdomain.com/manager and login then the page can be viewed
          "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
          • 40706
          • 128 Posts
          Its should be an cookie Problem.

          If you log in into domain1.com/manager only an cookie for domain1.com exists that allows you to see unpublished.
          So you should log in into domain2.com/manager to see these unpublished Documents below domain2.com
            • 23018
            • 353 Posts
            Well, there is no domain1.com/manager The manager was moved to a completely different domain.

            I got this idea from the docs:

            For an even more thorough solution, you could put the manager URL on a completely different domain, e.g. $modx_manager_url = 'http://othersite.com/r4nd0m/'; This would require that you have multiple domains on your server, but the advantage here is that it would really throw off attempts to hack your site because it wouldn't be clear that the 2 domains are related, but it would require far more sysadmin work to make this type of setup work.

            I like this idea, but it comes with with a whole bunch of problems.

            Opengeek told me on slack that "different domains cannot share sessions".

            Possible solutions:

            opengeek: you could create unlisted pages for login on each context that create a token for the `mgr` context, but someone will have to actually login to that separately from the manager for it to work".

            aesmith: you can add a symlink (may need ssh access though) to the manager folder location… then do as I suggested and login under that domain

            I'll see into both options and come back later to let you know how it ended.
              Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe