We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33636
    • 7 Posts
    Hello -

    I’ve set up a subdomain for my site to house a mobile version of the site. I have the contexts all set up and working properly. However in testing some of the pages discovered that I can not preview an unpublished page within the "mobile" context. I am set up as the main administrator for the site and am able to preview unpublished documents in the stander "web" context.

    I’ve tried searching the forums and web for this same situation, but I can’t find anything that replicates this problem. If anyone has any suggestions I’d appreciate it.

    Thanks
    • Make sure you have a session_cookie_domain System Setting set to .domain.tld or you will not have the same session as you do in the manager, which is required for viewing unpublished pages in subdomains. Notice the preceding dot (.) in the value—this is critical, allowing your session cookie to be shared across all subdomains of your domain. Note that once you change the system setting, you will need to login again; if you have trouble, try truncating the modx_sessions table in your database via phpmyadmin or your preferred database client.
        • 33636
        • 7 Posts
        Thanks so much for the reply.

        I apologize. I’m a graphic designer by trade and am trying to development my programming/backend skills so I’m a little unclear about the instructions you provided.

        To clarify, when you said to create that system setting with the value of: .domain.tld , is that meant to be unique to my domain -- (i.e. --> .myDomainName.com)

        or is the value supposed to be litterally --> ".domain.tld" ?

        Thanks for your help again
        • Not literal — it should be whatever your domain name and TLD is. IOW, for my domain jasoncoward.com, if I want to share sessions across subdomains, such as www.jasoncoward.com and beer.jasoncoward.com, I would set my session_cookie_domain to .jasoncoward.com
            • 36575
            • 104 Posts
            I know this is a really old thread, but I am having the same issue, but it's not with a subdomain, it's a separate URL. I tried adding a session_cookie_domain in the context's setting, but this doesn't help. Any suggestions?
            • You can't login to multiple domains at the same time. You will have to login specifically to your front-end context with a policy that provide view_unpublished permission to your user (group).
                • 36575
                • 104 Posts
                Thanks opengeek, how would I set that up? Sorry, user permissions etc are still a bit like greek for me.
                  • 6038
                  • 228 Posts
                  Quote from: opengeek at Apr 20, 2011, 12:27 PM
                  Make sure you have a session_cookie_domain System Setting set to .domain.tld or you will not have the same session as you do in the manager, which is required for viewing unpublished pages in subdomains. Notice the preceding dot (.) in the value—this is critical, allowing your session cookie to be shared across all subdomains of your domain. Note that once you change the system setting, you will need to login again; if you have trouble, try truncating the modx_sessions table in your database via phpmyadmin or your preferred database client.

                  Perfect - this also works if you have another context where site_status setting is No.
                  Clearing the permissions cache/flushing all sessions was definitely required to enable this.
                    • 50565
                    • 1 Posts
                    Hi,

                    We have different context for different language. But document and resourses are not working for a context.
                    Can anybody tell me that how can we create new context in modex version 2.3.3-pl.

                    Thanks
                    Praveen Shukla
                      • 51654
                      • 2 Posts
                      I set up a new context for our sub-site. I have a couple questions.


                      • Is there an option to set a sub-domain as subdomain.domain.com versus domain.com/subdomain?
                      • All pages under the new context is not loading. Whether its published or not. I tried putting the subdomain in session_cookie_domain and also tried setting the site_status to no for the respective context.

                      Anything else I need to do? I also cleared the cache.