Hi there,
I got two contexts in my installation. Each contex has its own domainname.
In the first context (web) I got a folder with the content for the website.
The second context shall take the content from the folder of the first context (web)
When I call the Domain of the second context the site apear fine. With getResources I list a view resources from the folder of the first context (web).
BUT, when I click on the content item to see the fullview I get an error 404.
What can it be?
-
MODX Staff
- 10,725 Posts
Is the URL being generated correctly? How are you switching Contexts? How are you forwarding to the Resources in the web Context when users are accessing the other domain's Context?
If I put the site URL hard coded inside the link, it could couse a lot of problems. It is important that the user dont see the link of context-1 when they are in the context-2 domain.
I found a system setting "allow_forward_across_contexts" which was set to no. After I set it to yes I did not get the 404 nomore but now it redirect to the startsite of context-1 when I click on the content item.
Any suggestions about the problem?
Still on the same problem. Look like MODx can not handle cross context content (?) I did not finde a solution, yet.
-
MODX Staff
- 10,725 Posts
It handles it fine. Do not cache the site_url anywhere in your cross-context content however. If a context is meant to server multiple site_url's, then make sure you do not set that setting in that Context, allowing the client requested HTTP_HOST determine the actual site_url (which is MODX's default behavior until you set site_url, base_url or other settings in the System or a Context).
I delete all this settings from the context (site_url, base_url) and clear the cache. But it is still the same.