Multistore views - add storecode to url - Master Config URL not working

Are you using WebRotate 360 Product Viewer for Magento?
Circum360NL
Posts: 7
Joined: Wed Mar 07, 2018 11:56 am
Contact:

Multistore views - add storecode to url - Master Config URL not working

Postby Circum360NL » Mon Mar 18, 2019 1:25 am

Hi Support,

I enable multi store views on my Magento 2.2.7 website to provide multilanguage.

After enabling Add store code to urls my master config.xml is not loading anymore, because it is looking in the wrong URL.

The Master Config URL (PRO) is set as: /_config/config.xml which will be loaded as https://www.domain.com/_config/config.xml

But when I add the store code to the URL, I will get a 404 on the XML file, because it is trying to load as: https://www.domain.com/[storecode]/_config/config.xml

WebSupport
Posts: 948
Joined: Thu Aug 23, 2012 11:35 am
Location: Pasadena, CA
Contact:

Re: Multistore views - add storecode to url - Master Config URL not working

Postby WebSupport » Mon Mar 18, 2019 3:35 pm

Hi and thanks for your message. Is the master xml file physically present at the updated location(s) as per your example?

Code: Select all

https://www.domain.com/[storecode]/_config/config.xml


It's likely not there, so may be you can simply name them as something like this for each store config?

Code: Select all

/_config/configEN.xml
/_config/configDE.xml
...etc

Circum360NL
Posts: 7
Joined: Wed Mar 07, 2018 11:56 am
Contact:

Re: Multistore views - add storecode to url - Master Config URL not working

Postby Circum360NL » Tue Mar 19, 2019 4:16 am

Hi,

I do not need extra config.xml files as the products in the storeviews are identical. It is only the language that is different.

The problem is that the value set in the backed for The Master Config URL (PRO) will be paste at the end of the URL.

In my situation I have a dutch view with storecode NL. It will generate the URL https://www.papegaaienzoo.nl/webshop/nl

The 'nl' is virtual. It is not a physical folder on the webserver.

When opening a productpage, the adhoc plugin will load the config in https://www.papegaaienzoo.nl/webshop/nl ... config.xml and this will end in a 404, because the config.xml cannot be found in that folder.

WebSupport
Posts: 948
Joined: Thu Aug 23, 2012 11:35 am
Location: Pasadena, CA
Contact:

Re: Multistore views - add storecode to url - Master Config URL not working

Postby WebSupport » Tue Mar 19, 2019 5:35 pm

Hmm, I see... We're reviewing how to fix this :o Will confirm here shortly.

WebSupport
Posts: 948
Joined: Thu Aug 23, 2012 11:35 am
Location: Pasadena, CA
Contact:

Re: Multistore views - add storecode to url - Master Config URL not working

Postby WebSupport » Tue Mar 19, 2019 5:44 pm

Please try removing this line on line 24 in \app\code\WebRotate360\ProductViewerAdHoc\view\frontend\templates\adhoc.phtml:

Code: Select all

<?php $configPath = $helper->getBaseUrl() . $configPath; ?>


PS: you may also need to add /webshop to your Master config URL in the extension settings in admin to look like this, if your Magento actually lives under webshop folder:

Code: Select all

/webshop/_config/config.xml

Circum360NL
Posts: 7
Joined: Wed Mar 07, 2018 11:56 am
Contact:

Re: Multistore views - add storecode to url - Master Config URL not working

Postby Circum360NL » Thu Mar 21, 2019 6:51 am

Thanks. Removing that line did the trick.

I have installed the version with composer, so I had to change adhoc.phtml under the vendor folder.

Will there be a version update coming for this one? Because, when I will update my system with composer I think it will overwrite my change on the file.


Return to “Magento Integration”

cron