← Back to Multi Domains Support
Hi, We are running into an issue with the plugin. We have 3 urls:
- example1.com
- example2.com
- example3.com
We've created aliases for these domains in directadmin:
- example2.com points to example1.com
- example3.com points to example1.com
All is well..
We've created bindings for these domains:
- example1.com binds to theme1 and page1 of theme1
- example2.com binds to theme1 and page2 of theme1
- example3.com binds to theme2 and ALL_THEME_PAGES_WITH_ROUTE_PATCH
theme1 is the default theme selected in the settings.
example1.com and example2.com work as expected. example3.com does not change the theme to theme2 on the frontend. It loads the default theme (theme1).
If i go to example3.com/backend, theme2 is activated as current theme.
Enabling 'Allow debug mode with Url output' gives the following result when going to example3.com:
array:14 [▼
"theme" => "theme2"
"pageurl" => ""
"backfront" => "nouse"
"usergroup" => ""
"linksreplace" => 0
"params" => ""
"prefix" => ""
"suffix" => 999
"addget" => 0
"rempagevar" => 0
"domain" => "http://example3.com"
"domain_with_suffix" => "http://example3.com"
"is_protected" => 0
"url" => ""
]
So it looks like it tries to load the right theme. But it always shows theme1(default). It even redirects to example3.com/en as it should in theme2. But still shows theme1.
Thanks!
Last updated
Hi,
What is your current CMS-version? Try to exit the admin panel and check example3.com again (in the latest version of the plugin, work was done on binding the theme to the backend-user for pages editing in CMS, most likely the reason is because if you are authorized as a backend-user, then the corresponding theme for backend-user is automatically attached). For what domain do you have backend users permissions? (although this should not affect, because restrictions for backend user only work in backend). Try to reset the cache in the list of binds (sometimes it fails, if the record was edited). Hard mode enabled? I tested it on 461 build, did not reveal any deviations in the logic of work on the test server.
In general, judging by the given log, it should work correctly. Most likely, the error is somewhere at the cache level (This plugin, CMS, Web-server, Browser)
Last updated
Hi Linkonoid,
Our CMS version: 461
When setting theme2 as the default theme in mdomains settings, the correct theme is loaded. But the static pages content is not displayed in the page. The layout is displayed in the page.
Also, theme1 is loaded for example1.com and example2.com, and these work like a charm: loads content from static pages.
We suspect that example3.com never reaches your router: When enabling debug mode from the mdomain settings, example1.com and example2.com show the routing debug array. example3.com does not.
Also, the problem seems to occur with the ALL_THEME_PAGES_WITH_ROUTE_PATCH option: when creating a binding from example3.com/en/business to the business page, everything is fine, static page content of the business page is shown. But we do not want to create seperate bindings for all pages on our website.
Hope i've supplied you with enough info.
1-3 of 3