← Back to Multi Domains Support
Plugin does not set the theme anymore, also I can not select any page in the first theme other than the default choice, also plugin prevents activationg a theme manually in backend settings.
Also had to comment out the part that uses StaticPages controller, because I do not use static pages and I get exceptions otherwise.
What a version of the plug-in? The current version is 1.0.4
- I do not quite understand the situation at which bugs appear. The test: http://linkonoid.com/backend/backend/auth/signin (admin / admin). Can you reproduce your problem on test? The production also revealed no significant problems.
- Regarding StaticPages - yes the problem exists when the plug-in is disabled or not present, I'll try to solve this.
-
Reproduced by selecting the first Theme in the list. Still for some reason selecting an active theme in backend works at your demo, but doesn't work on my websites. This part is causing troubles so I changed the event handler to older version, which got my websites up and running at least.
Event::listen('cms.theme.getActiveTheme', function () use ($binds, $requestUrl) { foreach ($binds as $domain => $value) { // echo "++" . $requestUrl . "</br>" . $value['pageurl'] . "</br>" . $domain . "</br></br>"; $pos = strpos($requestUrl, $domain); if ($pos !== false) { if ($value['pageurl'] === "0") { Config::set('app.url', $requestUrl); return $value['theme'];} if ($requestUrl === $domain) { Config::set('app.url', $domain); return $value['theme'];} } } });
This is what I changed it to for now:
Event::listen('cms.theme.getActiveTheme', function () use ($binds, $requestUrl, $currentHostUrl) {
foreach ($binds as $domain => $bind) {
if (preg_match('/' . $currentHostUrl . '/i', $domain)) {
Config::set('app.url', $domain);
return $bind['theme'];
}
}
});
Also your Router overriding is breaking using of $this->param() in ALL components since router now has no parameters when components are running
Do you have themes or themes folder names on not English language? Something tells me that the bug in strpos function.
myabc26976 said:
Do you have themes or themes folder names on not English language? Something tells me that the bug in strpos function.
No, all latin
myabc26976 said:
Do you have themes or themes folder names on not English language? Something tells me that the bug in strpos function.
Also like I mentioned earlier I did reproduce the issue partially on you demo.
so it will be more correct: preg_match('/'.$domain.'/iU', $requestUrl). I change strpos to preg_match (or mb_strpos - this full support UTF-8)
Last updated
myabc26976 said:
The router is redefined with the goal of making the theme to public variable
Ok, but it breaks components of other plugins that access url parameters of router.
I reverted your plugin to previous stable version for now, so no rush
Last updated
Ok, I fixed the bug with the first theme in the list and replace strpos on mb_strpos in v.1.0.4
Thanks for the identified bugs! Unfortunately, I can not give the plugin a lot of time, because most of the time I write only on Golang and rarely go back to the old man PHP
myabc26976 said:
Thanks for the identified bugs! Unfortunately, I can not give the plugin a lot of time, because most of the time I write only on Golang and rarely go back to the old man PHP
Well that's where people usually make their product open source - when they have no time or means to maintain it by themselves, right?
Otherwise it feels really disappointing - purchasing a product that is not well tested and stable and causes downtime for your own projects.
Still, thanks for trying to solve the issue right now.
Plugin update to the v1.0.5. See description.
P.S.: The plugin will never be free due to the fact that the cost and so is minimal, not justify the time for development (even considering that 40% of the base code is developments with the license of MIT, for example in the code of Plugin.php is the code of the OctoberCMS itself, almost completely rewritte one function from Router.php. Other 60% - is exactly the functional, for the implementation of which you need to spend time). It's the price for support! At purchase the work of the main functional of the plugin, presented on demo-site is guaranteed and it is not provided testing of all possible user configurations (they can not be foreseen). That's why the cost of the plugin is $5, not $50. You should understand that everything the price include and developer time - and its costs much more than $5. As a developer with 23 years of experience, I had to write in many languages, and working with someone else's free code - this is the way to nowhere...
Last updated
Don't tell me you're angry with me for my feedback, that's ridiculous. I expected to save time with this purchase, doesn't matter 5 or 50 dollars, but what I do get is trouble instead. I'm not asking you to release it for free, I have purchased it already. I just expect it to work properly. We can chat and try to solve the issues together if you want. And no need for personal stuff here on support forums.
Hello there again,
after update 1.0.6 nginx behind reverse proxy now throws:
(104: Connection reset by peer) while reading response header from upstream...
whenever I try to access front-end pages, while backend area works fine.
There's not much info about the issue, since I don't get any exceptions except this one in nginx error.log. I reverted plugin back to 1.0.5 for now, it works fine.
If you need any further information - please tell.