We have a site with two contexts: Web and US. We are using Babel and LangRouter to manage routing and switching between context pages. Everytime we switch to the US context and navigate around different webpages, or refresh the current one, after 1 or 2 pages it will result in us getting a 404 error for the requested US context page and switches back to the web context.
Once we get the 404 error, after one or two refreshes we then switch back to the US context. However this problem does continue with the contexts repeatedly switching back and forth because of the 404 error.
Has anyone else encountered any similar problems before?
Thanks
I also experienced this, after I searched for information on forums, I finally found a solution.
for my case. The first thing I missed was to give anonymous user group permissions for each context with Access Policy Load only and set session_cokie_domain in the system setting.
We’re still encountering the same problem after changing the Access Policy for the 2 contexts from Load, List and View to Load Only, and set the session_cookie_domain to the site domain.
After investigating this issue further it turns out it is caused by the context_settings cache folder being turned off in system settings. However, when turning the cache for this folder on, the context_settings folder causes the context to stop working completely when you save a resource (templates, snippets etc).
Are there any known problems with the context_settings cache folder and anyone who might’ve experienced any similar problems?
It does sound a lot like this will be ACL-related. Can you provide a screenshot of both your contexts’ permissions setup? Right click the context to edit it, and then take a screenshot of the permissions tab so everything is nicely in one place.
Unfortunately it did break again after following your instructions, the cache/langrouter has 1 file “langrouter.contextmap.cache.php” file inside. Thanks.
Looks like there’s a similar post here relating to multi-lingual & context settings cache, although involving XRouting rather than LangRouter.
Sadly, even though it’s marked as ‘solved’, as far as I can see, the OP abandoned using contexts in the end and set up a separate virtual server for the second language.