Multi Domains

Create multiple domains or url and bind this to arbitry theme or page/staticpage with extending routing rules use single CMS installation (support backend)

Back to Multi Domains Support

slowpokefarm
slowpokefarm

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.

slowpokefarm
slowpokefarm

An urgent fix for this is required asap

Linkonoid
Linkonoid

What a version of the plug-in? The current version is 1.0.4

  1. 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.
  2. Regarding StaticPages - yes the problem exists when the plug-in is disabled or not present, I'll try to solve this.
slowpokefarm
slowpokefarm
  1. 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'];}
                }
            }
        });
slowpokefarm
slowpokefarm

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'];
                }
            }
        });
slowpokefarm
slowpokefarm

Also your Router overriding is breaking using of $this->param() in ALL components since router now has no parameters when components are running

Linkonoid
Linkonoid

Do you have themes or themes folder names on not English language? Something tells me that the bug in strpos function.

slowpokefarm
slowpokefarm

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

slowpokefarm
slowpokefarm

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.

Linkonoid
Linkonoid

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

Linkonoid
Linkonoid

The router is redefined with the goal of making the theme to public variable

Linkonoid
Linkonoid

I see the problem in first select theme, I'll try to fix it

slowpokefarm
slowpokefarm

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

Linkonoid
Linkonoid

Ok, I fixed the bug with the first theme in the list and replace strpos on mb_strpos in v.1.0.4

Linkonoid
Linkonoid

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

slowpokefarm
slowpokefarm

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.

Linkonoid
Linkonoid

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

slowpokefarm
slowpokefarm

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.

Linkonoid
Linkonoid

Ок, in any case - big thanks.

slowpokefarm
slowpokefarm

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.

1-20 of 23