← Back to Multi Domains Support
Hello, I have one site with your plugin, working on two domains:
desktop version xxx.com (main)
and mobile m.xxx.com (binded to your plugin)
I have two different themes for this domains and the same url path:
xxx.com/cat
xxx.com/services/:category/:service
the same for mobile:
m.xxx.com/cat
m.xxx.com/services/:category/:service
Could you explain the settings for my case pls.
I need to bind only m.xxx.com or both? And maybe I need to change url's for mobile
(m.xxx.com/MOBILE/services/:category/:service, and use suffix = 1.
I try different settings but it doesn't work prop.
Thank you
Last updated
Now it's work on:
all_theme_pages_with_route_path
binded m.xxx.com
suffix 0
difference 3
----
m.xxx.com/cat - work
m.xxx.com/services/:category - work
m.xxx.com/services/:category/:service -for some pages it's work, but for others nginx return 502 error page...
----
if I change difference from 3 to 2
m.xxx.com/services/:category/:service - openes version of page on xxx.com/services/:category/:service
Last updated
Hello! In Your case, there is no extended routing, a simple binding of domains to different themes is used. Please do the following:
- Register settings for both domains, no use "/path" in end domain url (https://xxx.com - first theme, https://m.xxx.com - other theme).
- Select ALL_THEME_PAGES_WITH_ROUTE_PATH
- Suffix = "" (NOT "0"!, uses for routing and replace original url path, not use in your case).
- Diff = "" (uses for routing and replace original url path, not use in your case)
Last updated
Suffix = "" (NOT "0"!, uses for routing and replace original url path, not use in your case).
Diff = "" (uses for routing and replace original url path, not use in your case)
I had this error on save bindings
"SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'suffix' at......
I add to Binding model: protected $nullable = ['suffix','pathdiff'];
But plugin it's still not working...
xxx.com - work
m.xxx.com -work
on m.xxx.com/services open xxx.com/services
What database are you using (+ version)? Today I will check on your version (first-level domain and third-level domain, a plugin error may be present)
Last updated
Linkonoid said:
What database are you using (+ version)?
MYSQL Inno DB utf_8, Mdomain 1.1.5,
suffix and pathdiff have Integer types and now it's NULL for suffix and '0' for pathdiff
Last updated
MYSQL Inno DB utf_8, Mdomain 1.1.5,
- Version Mysql? (previously there were problems with different versions of Mysql)
suffix and pathdiff have Integer types and now it's NULL for suffix and '0' for pathdiff
- Yes, In update Migration file (begin from v.1.1.0): $table->integer('suffix')->nullable()->unsigned(); $table->integer('pathdiff')->nullable()->unsigned()->default(0);
Last updated
Linkonoid said:
MYSQL Inno DB utf_8, Mdomain 1.1.5,
- Version Mysql? (previously there were problems with different versions of Mysql)
suffix and pathdiff have Integer types and now it's NULL for suffix and '0' for pathdiff
- Yes, In update Migration file (begin from v.1.1.0): $table->integer('suffix')->nullable()->unsigned(); $table->integer('pathdiff')->nullable()->unsigned()->default(0);
mysql Ver 14.14 Distrib 5.7.24, for Linux (x86_64) using EditLine wrapper
The problem is something different, I will try to find out, but unfortunately, there is little information .. Please specify all settings in Your plugin settings
I tried to reproduce your problem with 2 domains, see my example. As you can see everything works (in my example there are many bindings for domain2 besides this binding, therefore it is not quite identical to your case)
https://domain2.test.linkonoid.com https://sub.domain2.test.linkonoid.com/ (all pages work)
dzherenashvili34875 said:
Linkonoid said:
MYSQL Inno DB utf_8, Mdomain 1.1.5,
- Version Mysql? (previously there were problems with different versions of Mysql)
suffix and pathdiff have Integer types and now it's NULL for suffix and '0' for pathdiff
- Yes, In update Migration file (begin from v.1.1.0): $table->integer('suffix')->nullable()->unsigned(); $table->integer('pathdiff')->nullable()->unsigned()->default(0);
mysql Ver 14.14 Distrib 5.7.24, for Linux (x86_64) using EditLine wrapper
About MySQL I asked, because you had a problem with the save bindings, it should not affect the final work (but this behavior of the plugin is also not entirely correct; although everything is possible, perhaps the problem is in the details). I have MariaDB 10.1.37 on test server.
In my tests in the settings the following options are included:
- Enable hard mode with replace original cms Router
- Allow links to be replaced on the page according to your binds (Most likely, the problem is here, if you have this option enabled, try disabling it and checking the operation of a direct link.)
Linkonoid said:
The problem is something different, I will try to find out, but unfortunately, there is little information .. Please specify all settings in Your plugin settings
I tried to reproduce your problem with 2 domains, see my example. As you can see everything works (in my example there are many bindings for domain2 besides this binding, therefore it is not quite identical to your case)
https://domain2.test.linkonoid.com https://sub.domain2.test.linkonoid.com/ (all pages work) lafrench.ru
m.lafrench.ru
DB: http://prntscr.com/nim4t4
BINDINGS: http://prntscr.com/nim5i4
Settings: http://prntscr.com/nim7dq
CMS : http://prntscr.com/nim8xe
Last updated
Try to replace the Router file CMS the plugin file (from Vendor path in hand mode, or from plugin Settings), as there are very significant differences in the work with this option and without the use of this option. If my memory serves me, this hack was needed during development just because of the incorrect operation of the plugin with the page settings in standard mode (without "hardmode")
Last updated
Linkonoid said:
Try to replace the Router file CMS the plugin file (from Vendor path in hand mode, or from plugin Settings), as there are very significant differences in the work with this option and without the use of this option.
When I turn on this option from mdomain plugin settings page, nginx return 502 error on all pages...
But it's start work, not good (On some pages 502 error), but work with this settings:
http://prntscr.com/nimm9d
Yes, I managed to reproduce the problem (502 error) on the last build CMS (447). I will look for a problem, please wait for the message ...
Last updated
Problem found and localized (see tests). Plugin the updated on v1.1.6 (Bug fix "Hard mode work"). Please update (before update necessarily OFF this option ! in the future I will make a more correct replacement of the file, when replacing, they simply change places and names) and enable "Hardmode"
The problem turned out to be very simple (unfortunately, I must admit - this is my mistake due to the usual carelessness): the newRouter.php file (Vendor folder) contains the original source file CMS (not modified by me). So I just made changes to the new source file from CMS (447 build) and placed it in a folder Vendor (newRouter.php) in plugin v.1.1.6.
Thanks for the feedback, it helps a lot in identifying any problems !!!
Last updated
First problem...
Ammm... Not sure... Have the same result, with (now without 502 error) and without 'hard mode'...
still have page from https://lafrench.ru/uslugi on https://m.lafrench.ru/uslugi, only main pages works prop...
Second...
You need to add to your binding model nulled for suffix brcause of: http://prntscr.com/nipk93
Third
You have wrong translate for 'ru' locale, I've had to change local of backend on english to understand definition of hardmode switch:
'hardmode' => 'Разрешить режим работы с патчем оригинального Cms Router-а'
change it on:
'hardmode' => ' Разрешить "Hard mode", при включеннии происходит замена файла Route Cms на файлом Route из плагина'
Do you have acces to backend of demo sites? Or I could give access to my...
First problem...
- Yes, the problem with use ALL_THEME_PAGES_WITH_ROUTE_PATCH it is present (apparently it appeared with the introduction of suffixing, because the logic of the plugin has changed a lot, I will try to solve it in the near future). As a solution (prior to correction), register your settings for each path with reference to the topic page with suffix "0" (https://lafrench.ru/uslugi and https://m.lafrench.ru/uslugi)
The rest is noted for updated:
Third...
- To be precise, the exchange operation newRouter.php <-> Router.php, i.e. the contents of the files are reversed (when turned on, the original Router.php file is copied to the Vendor folder as Router.php, modified by newRouter.php in "modules\cms\classes\Router.php", when it is turned off, the reverse operation occurs - to the Vendor folder the modified newRouter.php file is restored, and the original file is in "modules\cms\classes\Router.php"). I will replace the wording in the localization so that it is clearer ...
Second...
- This is optional and highly dependent on the database version. In my tests versions (MariaDB & Sqlite) works without this. OK - I will add, it will not be superfluous ...
Last updated
Bug with ALL_THEME_PAGES_WITH_ROUTE_PATCH fix in new update v1.1.7 of the plugin. All works in standard mode:
- https://domain2.test.linkonoid.com/uslugi/variable (Theme "demo")
- https://sub.domain2.test.linkonoid.com/uslugi/variable (Theme "demo2")
Last updated
Linkonoid said:
Bug with ALL_THEME_PAGES_WITH_ROUTE_PATCH fix in new update v1.1.7 of the plugin. All works in standard mode:
- https://domain2.test.linkonoid.com/uslugi/variable (Theme "demo")
- https://sub.domain2.test.linkonoid.com/uslugi/variable (Theme "demo2")
Hello, thank you for rapid response, but I have 502 on some pages on m.lafrench.ru:
URL: /uslugi/:category/:slug
https://m.lafrench.ru/uslugi/manikyur/detskij-manikyur-la-french - WORK 200
https://m.lafrench.ru/uslugi/manikyur/muzhskoj-manikyur - NOT WORK 502
https://m.lafrench.ru/uslugi/manikyur/manikyur-apparanii - NOT WORK 502
https://m.lafrench.ru/uslugi/kompleksy/manikyur-kompleks-snyatie-manikyur-pokrytie - WORK 200
On main domain this routes work perfect
With option HARDMODE, 502 on all pages...
I check 502 error route
In your plugin on Event::listen('cms.page.display'.....
dd($result) return string page, but nginx answer with 502 error...
I don't understand what happens with nginx....
Last updated