Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with multi website URL #7815

Closed
netzweltvimal opened this issue Dec 15, 2016 · 24 comments
Closed

Issue with multi website URL #7815

netzweltvimal opened this issue Dec 15, 2016 · 24 comments

Comments

@netzweltvimal
Copy link

Preconditions

  1. Magento 2.1.3

Steps to reproduce

  1. Create Multi Website and multi stire
  2. Set Url for Second website
  3. Set Url for Second website Store (Check Use Website)

Expected result

  1. Second website Store url should be Second website URL after Check Use Website Url

Actual result

  1. Second website Store url is using main site url after Check Use Website Url
@tal-girit
Copy link

i have same problem , i got 2 domains that ref to deterrent store views be .htaccess
like this :
SetEnvIf Host .kushies. MAGE_RUN_CODE=kushies_he
SetEnvIf Host .kushies. MAGE_RUN_TYPE=store
SetEnvIf Host .aquaview. MAGE_RUN_CODE=aquaview_he
SetEnvIf Host .aquaview. MAGE_RUN_TYPE=store

i also try to follow the guide : http://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_over.html
without success ..

@netzweltvimal
Copy link
Author

We are using Apache server. This issue occurs after upgrade from 2.1.2=>2.1.3

@tanloi3004
Copy link

I have same problem. After upgrade to 2.1.3, I can't use multiple domain name for store view scope.

@ghost
Copy link

ghost commented Dec 16, 2016

Hello,
I can confirm that issue.
Before upgrade from 2.1.2 to 2.1.3 my Multi-Store setup has worked.
It is configured like this: Subdomain1.domain.com and Subdomain2.domain.com
Now Subdomain2.domain.com redirects to the Main-Store (Subdomain1.domain.com).

It looks like magento does not note at my /etc/httpd/....../.conf file the following lines:
SetEnv MAGE_RUN_CODE "XYZBLA"
SetEnv MAGE_RUN_TYPE "website"

Maybe the variables changed?

Also everybody please note that the update overrides the .htaccess. My mod deflate options were lost and I had to insert them again.

@alexpoletaev
Copy link

My guess, here is a related issue #7840

@salelsol
Copy link

Same issue any news about ?

@salelsol
Copy link

Need to confirm if this is really a Magento 2.1.3 bug because two sumdomains are down afther upgrading from from 2.1.2 to 2.1.3 just works fine in main domain.

@Ctucker9233
Copy link

@salelsol I would say it is a bug and it's related to #7841. It would seem that store fallback and theme fallback now work a bit differently, It works perfectly fine in 2.1.2.

@salelsol
Copy link

Do you think best solution is revert to Magento 2.1.2 ? or maybe this bug will be fixed early in future 2.1.4 release.

@tanloi3004
Copy link

I reverted to 2.1.2

@Ctucker9233
Copy link

So did I. I'm trying to dig around and see where the breaking code is. I'll keep you posted.

@salelsol
Copy link

I'd rather wait because I just made some changes to some extensions installed to be compatible with magento 2.1.3 and if I revert then will be lost.

@alexpoletaev
Copy link

Guys, please check workaround here #7840 and tell if it works for you. This fixed the configuration retrieving from the website scope for me.

@salelsol
Copy link

Fixed with @alexpoletaev help.
First change line $code = $website['website_id']; should be replaced with $code = $website['code'];
in vendor/magento/module-store/Model/Config/Processor/Fallback.php and afther modify your .htaccess

@ghost
Copy link

ghost commented Dec 21, 2016

Thanks to @alexpoletaev
Your solution worked for me. Just edit the line of code and clear the cache.

@salelsol
What did you modified in your .htaccess? I haven't modified anything and it worked.

@salelsol
Copy link

@Yunus260 You must modify .htaccess when you install magento 2.1.3 afther run: php bin/magento setup:upgrade

@erikhansen
Copy link
Contributor

I experienced this issue after upgrading a multi-website install from 2.1.2 to 2.1.3. I had my "Base Url" and "Secure Base Url" values configured at the Website scope. I switched the values to be stored at the Store View scope, and that fixed my problem.

@ghost
Copy link

ghost commented Dec 22, 2016

@salelsol I still do not understand what you mean with "You must modify .htaccess.."
After install or upgrade there is nothing that has to be modified in .htaccess which is significant for multi-domain. Please be more clear.

@salelsol
Copy link

@Yunus260 Your .htaccess start with this line ?

All explanations you could find in .htaccess.sample file

If Yes you are Magento 2.1.3 .htaccess file right
If Not you would be modify from fresh .htaccess file

@salelsol
Copy link

Yunus260 Magento 2.1.3 .htaccess started :

All explanations you could find in .htaccess.sample file

DirectoryIndex index.php

php_value memory_limit 768M
php_value max_execution_time 18000
php_flag session.auto_start off
php_flag suhosin.session.cryptua off

@ghost
Copy link

ghost commented Dec 22, 2016

@salelsol I used the Admin-Backend to upgrade from 2.1.2 to 2.1.3 and that upgrade has updated my .htaccess, like mentioned above.
My .htaccess now looks like this:
https://github.com/magento/magento2/blob/2.1.3/.htaccess

Thats why I wrote " I haven't modified anything and it worked."
I do not know why your .htaccess has not been updated.

@salelsol
Copy link

@Yunus260 I use ssh command line to upgrading all new Magento versions and then I must manually add properly line to redirect to subdomains. I this version .htaccess is quite different from previous version so I have referred to that .htaccess file.

@KrystynaKabannyk
Copy link

Hi @netzweltvimal, this issue was fixed under MAGETWO-62648 in 2.1.4, that's why I closed it. If you have additional questions or info please feel free to reopen this one or create a new one.

@x1cawa
Copy link

x1cawa commented Nov 24, 2020

I know I have an old version but I have the same issue in version 2.1.18.
I have 2 shops (with different base urls in magento admin settings) and 4 views.
url1.com/store_code1
url1.com/store_code2
url2.com/store_code3
url2.com/store_code4
If I try to get them by those links it works fine but if I don't add store code the system thinks it is store_code1 with base url1 even I open url2.com (it redirects to url1.com)
Please help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants