We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45845
    • 1 Posts
    I'm trying to host 2 websites (2 domains) under a single MODX Revo 2.2.14-pl using 2 context and Gateway Manager plugin. But only the first context run OK, it show different pages for different page request, even a custome error page for non-existent page (invalid ID). The second context only return its index page, even when requested invalida page ID.

    What may be the problem?
      • 49377
      • 5 Posts
      Quote from: tariusagi at Apr 05, 2014, 09:51 AM
      The second context only return its index page, even when requested invalida page ID.

      What may be the problem?

      I have the same problem, have you found a reason or way to fix this behaviour?
      I'm using gateway plugin, 2 domains are pointed and hosted in same directory.
        • 3749
        • 24,544 Posts
        Do you have an uncached base href tag in all the other contexts templates (note the exclamation point)?

        <base href="[[!++site_url]]" />


        You also need a site_url Context setting for each front-end context.

        If you already have those, see if temporarily making a user a sudo user solves it. If it does, it's a permission issue.
          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
          • 49377
          • 5 Posts
          Quote from: BobRay at Nov 16, 2014, 11:04 PM

          <base href="[[!++site_url]]">
          Yes, each used template has this in header.

          Quote from: BobRay at Nov 16, 2014, 11:04 PM

          You also need a site_url Context setting for each front-end context.
          Both web and secondary context have full set of rules: base_url, custom 404 error page, http_host, site_name, site_url.

          web context works fine - friendly urls work everywhere, custom 404 error page loads.
          secondary context - home page loads, any other pages including 404 error page (even when calling directly) - shows content from secondary context home page no mater what I do (disabling friendly urls don't resolve it)

          Access permissions for anonymous users on both contexts were the same - Load only, temporally changing it to anything doesn't help.

            • 3749
            • 24,544 Posts
            Have you tried deleting all files in the core/cache directory and clearing your browser cache and cookies?

            I can't think of anything else to suggest.
              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
              • 49377
              • 5 Posts
              Quote from: BobRay at Nov 18, 2014, 04:41 AM
              Have you tried deleting all files in the core/cache directory and clearing your browser cache and cookies?

              I can't think of anything else to suggest.

              No luck =\

              I tried Xrouting plugin instead of Gateway, results are suprising as hell.
              With it enabled my web context pages show this context 404 error page throughout .
              My secondary context though acts differently - it works when I try to access page by it's specific link (for example http://subdomain.domain.com/home.html - site_start for this context), but when i try http://subdomain.domain.com/ - as users would, i get this context 404 page.

              Honestly, I'm going slightly mad.
                • 3749
                • 24,544 Posts
                I try to avoid using Contexts whenever I can. This is why. wink

                Did you try my suggestion of making the user a sudo user and flushing all sessions?
                  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
                  • 49377
                  • 5 Posts
                  Quote from: BobRay at Nov 19, 2014, 02:14 AM
                  I try to avoid using Contexts whenever I can. This is why. wink

                  Did you try my suggestion of making the user a sudo user and flushing all sessions?

                  Yesm I'm able to create sudo user.
                  I flushed all permissions, cleared cache, even deleted contents of core\cache directory - no luck, same behaviour.
                  for secondary and even third context, i made for testing (уфср with full array op specific settings).
                    • 3749
                    • 24,544 Posts
                    If making the user a sudo user doesn't fix it -- it's *not* a permission issue. It must be in .htaccess, base href, or your method for directing users to the right context on a request.

                      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
                      • 39929
                      • 113 Posts
                      Hello, may I know if this problem is solved. We have the same problem with gateway manager.