As soon as, I set domain records with country paths, I get 404 errors on all pages, followed by a routing symfony error:
Symfony\Component\Routing\Exception\ResourceNotFoundException: None of the routers in the chain matched url '/system/404' in Symfony\Cmf\Component\Routing\ChainRouter->doMatch() (line 207 of C:\laragon\www\d8.dev\vendor\symfony-cmf\routing\ChainRouter.php).
I have to uninstall the module to make my website work again.
To be able to reinstall the module again and not having those 404 page with routing error, I have to remove first all domain records.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | country_path-404-on-front.patch | 1.17 KB | itsekhmistro |
| #4 | country_path-page_not_found-2841870-4.patch | 1.17 KB | agoja |
Comments
Comment #2
heyyo commentedIs this module working only with Apache ? Or could it be used also with NGINX ?
Comment #3
heyyo commentedComment #4
agoja commentedHello,
I faced the same problem.
Looks like there is no validation for available
$domain_suffixinCountryPathProcessorWe need to process path only in case when
$domain_suffixwas set in configuration.Comment #5
itsekhmistro commentedReviewed patch in #4 is ok
but reproduced the issue for website frontpage - 404 Not found is displayed in case of request to http://example.com/usa
It's related to fact that $path should be "/" in case of request to frontpage.
Added a fix for that.
Comment #6
itsekhmistro commented>Is this module working only with Apache ? Or could it be used also with NGINX ?
Yes, it's working for both Apache and NGINX. Initially developed on Nginx.
There is no known dependency on a webserver platform.
Comment #8
itsekhmistro commentedComment #9
itsekhmistro commentedThe last attached patch is applied.
Comment #10
heyyo commentedThanks for your work, but I still have the same issue with the last version of country_path.
Myabe I'm not using the module properly.
Here is some more details:
I have only 2 domains:
- d8.dev (with machine name d8_dev)
- d8.dev/france (with machine name d8_dev_fr)
I have defined my 2 different frontpages by importing 2 domain_config with these exact settings:
domain.config.d8_dev.system.site
name: 'Drupal 8 global'
page:
front: /node/2
langcode: en
default_langcode: en
domain.config.d8_dev_fr.system.site
name: 'Drupal 8 France'
page:
front: /node/1
langcode: fr
default_langcode: fr
When browsing
http://d8.dev : I successfully see my node/2
When browsing :
I receive error 404.
I inserted in my page the block Domain server information.
For any url under http://d8.dev/france, this block shows domain d8_dev, never d8_dev_fr.
By replacing this code
by
The block Domain server information shows now d8_dev_fr, but I still get the error 404 on any page under http://d8.dev/france
I hope those details, will help. regards
Comment #11
heyyo commentedComment #12
nijinanijil commentedI am facing the same issue #10
Comment #13
nijinanijil commentedHi,
I have set the domain records in the below mentioned way and it is working for me.
Host name : localhost
Domain Name : Domain 1
Country Path : usa (without '/')
Host name : localhost
Domain Name : Domain 2
Country Path : cn (without '/')
Thanks
Nijil
Comment #14
heyyo commentedThanks for the update @nijinanijil
It's working too for me :-)
As the description of the country_path property should be fixed.
Comment #15
heyyo commentedNow I can see my frontpage specified in my french domain config.
But there is still a problem with all URLS on the page. None of them start with the country path france.
Do you have the same issue ?
Comment #16
nijinanijil commented@heyyo
I am able to get URLs with country path for the links coming other than from editor. For the editor links I am not getting country path appended.
Comment #17
agoja commentedHello,
Is it still relevant ?
Can't reproduce with latest module version.
Regards.
Comment #18
agoja commentedComment #19
itsekhmistro commented