We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17301
    • 932 Posts
      ■ email: [email protected] | ■ website: https://alienbuild.uk

      The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
    • I did.
        • 46886
        • 1,154 Posts
        Hmm is this github issue relevant? He seems to provide a solution in there

        https://github.com/SEDAdigital/XRouting/issues/
        • Got it working. It seems it was some persistent caching problem (changing context settings took a while to be effective). It kind of works now.

          But it's really slow.

          I enabled debugging and tried to access /subdir1. This is what I got:

          ## MODX context map:

          Array
          (
          [_hosts] => Array
          (
          [domainname.nl] => Array
          (
          [0] => web
          [1] => subdir1
          [2] => subdir2
          )
          )

          [web] => Array
          (
          [base_url] => /
          [http_host] => domainname.nl
          [site_start] => 1
          [site_url] => https://www.domainname.nl/
          )

          [subdir1] => Array
          (
          [base_url] => /subdir1/
          [http_host] => domainname.nl
          [site_start] => 71
          [site_url] => https://www.domainname.nl/subdir1/
          )

          [subdir2] => Array
          (
          [base_url] => /subdir2/
          [http_host] => domainname.nl
          [site_start] => 69
          [site_url] => https://www.domainname.nl/subdir2/
          )
          )

          ## Requested URL:

          ## Requested URL with base_url: /subdir1/

          ## Matched context(s) (Array key defines match quality):

          Array
          (
          [1] => web
          [16] => subdir1
          )

          ## Request will go to context: subdir1

          ## Modified request URL:

            • 17301
            • 932 Posts
            Good stuff, thanks for reporting back.

            Setting up multiple contexts can sometimes be a pain! Glad you got it sorted though smiley
              ■ email: [email protected] | ■ website: https://alienbuild.uk

              The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
            • There's an additional challenge: my content editors cannot save newly created resources. They get the infamous 'access denied' error message when saving a new resource. It happens in all contexts, including 'web'.

              Working on existing resources is fine. compress_js and compress_css are off.

              The admin can save newly created resources.

              Maybe this has nothing to do with contexts, but it happens right after creating the extra contexts. But then again: the content editors did not create new resources for the existing 'web' context, just editing.

              (Yes, they have access to the contexts: they see the trees and can open resources.) [ed. note: handjes last edited this post 5 years, 11 months ago.]
                • 17301
                • 932 Posts
                check their access policy sounds like they may not have the correct permissions (you could swap it for a different policy to quickly check if this is the issue). Also check that that new resources created they have access to in the resource group.
                  ■ email: [email protected] | ■ website: https://alienbuild.uk

                  The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
                • It has the correct permissions. I have been working with these permissions on many sites. Permissions include the often mentioned class_map, view_template, view_user, etc.

                  I tracked the error down to a subdocument in connectors/index.php:
                  {"success":false,"message":"Toegang geweigerd!","total":0,"data":[],"object":[]}

                  I really don't understand why this suddenly is happening. (I did not update anything)

                  Strangely, a customer just called to mention they have the same issue on a MODX site without extra contexts! What is going on?
                  • You won't believe this: the permission 'new_document_in_root' was unchecked on both sites! Why did this happen?

                    I'm going to check all my sites now.