We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17016
    • 138 Posts
    After upgrading wayfinder to 2.2.0 we got on every load of so far uncached pages the error "(ERROR @ /index.php) Could not load context:" in the error-log.

    Does anybody know what is the reason for this or what we can do to avoid this error?

    Letti
      • 33976 ☆ A M B ☆
      • 571 Posts
      Hello,

      i found out that adding the parameter &context=`*your context name key*` reduced the number of errors (but there are still some).
      I guess that’s because of the introduction of new parameters.
        • 17016
        • 138 Posts
        Hi Romain,

        do you nevertheless use the new wayfinder-version? Or do you think the errors in the error-log are not of relevance?
          • 28215
          • 4,149 Posts
          For now, just add this parameter to your call:

          &contexts=`web`

          I’ll have a patch out tomorrow morning. Thanks!
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 28215
            • 4,149 Posts
            This has been fixed and 2.2.0-pl has been released.
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
              • 17016
              • 138 Posts
              Quote from: splittingred at Mar 06, 2011, 10:07 PM

              This has been fixed and 2.2.0-pl has been released.

              Hi splittingred,

              thanks a lot for your great work!

              Beside this. Do you maybe have examples how to use the parameters &cacheResults, &contexts and &startIdContext (in which settings they are useful)? I just added &cacheResults in the wayfinder-call for testing but nothing happend. Do I have to add a certain value for activating the cache? Maybe like &cacheResults=`1`?

              Thanks a lot again...
                • 33976 ☆ A M B ☆
                • 571 Posts
                Letti,

                as far as i understand the code (https://github.com/splittingred/Wayfinder/blob/develop/core/components/wayfinder/wayfinder.class.php#L93) it checks for the cache key (value) set in the system settings. So i guess &cacheResults expect a true (1) or false (0)

                &contexts seems to expect a context key (web, en, fr, whatever the name of your context is) or an array, comma separated

                I guess &startIdContext expect a number (id). Now what about if &contexts is an array…

                The "boss" will certainly en-light us wink
                  • 28215
                  • 4,149 Posts
                  The cache is automatically active, as &cacheResults is set to 1 by default. It generates a cache based a combination of your configuration and the Resource it shows on; so if you change a parameter on the Wayfinder call, it will cache it as a different file.

                    shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                    • 17016
                    • 138 Posts
                    Is there a way to clear the wayfinder-cache which is implemented in the new wayfinder-upgrade? When we add or remove resources we don´t see any changes in the menu even when we clear the global cash by ctrl+shift+u. Does anybody know how to clear the wayfinder-cache specifically?

                    Letti
                      • 22303 MODX Staff
                      • 10,725 Posts
                      Just disable it if it’s not working for you. It’s redundant caching in most cases anyway.