I just realised that not using the site_start setting inside the context creates a 404 error when try to access to the main page of every context just typing domain.com/cultureKey/
Context: en domain.com/en/GOOD
Context: es domain.com/es/404 ERROR
To avoid that error I’m including the site_start setting for every context.
But using PDOMenu to create the menu links, it makes the site_start page only point to domain.com/ no matter the context, all the other links are working fine.
any idea or advice to avoid this behaviour?
Thanks!
Do you get the same result from both contexts? (assuming you’re trying to get the same resource id from the footer which exists on both)
Does calling it uncached change anything?
Also, I’m unfamiliar with a [[*context_key]] tag being used in the parents parameter. Normally that would be resource ids.
Try adding an error_page setting to each context pointing at a dedicated 404 resource on each of those contexts.
Remove both the &parent parameters from your snippet call and add &context=`[[*context_key]]` instead.
Also it’s probably just a typo but make sure the context setting site_ur is actually site_url.
If it’s still not working. Add &showLog=`1` to the pdoMenu call to help you debug.
Also, go to the system settings for LangRouter and set debug to yes. You can then see exactly what’s happening with the routing in the error log.
Are you perchance including a resource that doesn’t belong to the current context?
Do a pdoMenu call without the &resource parameter and see what resources it has access to.
The problem is with the site_start in each context, they both are pointing to domain.com not to domain.com/cultureKey/
The [[+menutitle]] in both context is right, one display Hone the other Inicio
If I link from one context to the other it works fine: For example from a page in web context link to the site_start in context es, the url is: domain.com/es/ what is good!
Have you got the LangRouter system settings filled out, or just using the Babel ones? If not, try filling them out.
If still an issue, add a context with the context_key en and try using that instead of web. It shouldn’t but that’s how all mine get set up and they work.
Mate try everything and the only way that this works fine is removing the site_start value from the context.
the only problem is that domain.com/en/ or domain.com/es/ are error pages, but if I add index.html it works.
this is nightmare.
Do you have any simple setup backup that I can try in my hosting? just to check, may be it’s a php setting or something.