Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Clicking language twice on MSM-site

Status Resolved
Add-on / Version 1.0.15
Severity Critical
EE Version 2.7.2

Rockyard

Apr 24, 2014

Hi,

On a MSM-website, when I try to change language and click on the link a second time, I get a very strange URL.
(there’s no point in doing that, but I don’t like the fact people get a 404 when they do that)

http://www.jotunheimen.com/http://www.norwegianhideaways.com/http://www.norwegianhideaways.com/http://www.norwegianhideaways.com/http://www.norwegianhideaways.com/http://www.norwegianhideaways.com/no

norwegianhideaways.com is the main website of the MSM-installation, but when I check all paths and URLs in the settings jotunheimen.com seems to be correctly configured.

#1

BoldMinded (Brian)

Hi, Marien. I believe I recall this was an issue a couple months ago, but we never reached a solution. I had asked that you setup the site on a different server to see if you could replicate it because the server setup seemed very strange, and I have not been able to replicate this elsewhere. Until you can setup this site on a completely different server, or setup a fresh EE MSM install with Publisher on the same server as these sites with no content, and just enough templates to initiate a language change to ensure that the issue is with Publisher and not your current configuration or server, then I can’t spend time looking into the issue. We need to eliminate all other possible causes or strange server configurations before we pin the issue on Publisher. Let me know when you have either or both of the test environments setup and then I’ll debug it (please attach FTP and CP login information to the test environments to the ticket). Thanks.

#2

BoldMinded (Brian)

Also, I went to those domain names and was unable to replicate the issue. You’ll need to provide more details on exactly what URL to visit, and what links to click to replicate the issue.

#3

Rockyard

The only way Publisher could get that domain is via $_SERVER[“SERVER_NAME”] I guess, since it’s not in any settings. I searched for it, and found and replaced it in Publisger_session.php to $_SERVER[“HTTP_HOST”]. That does seem to fix the issue.

Do you think this is a solid solution? Since SERVER_NAME asks Apache or the server for the domain instead of using the domain the user is seeing, I would say HTTP_HOST is better. But I’m not a php developer of course, so I don’t know the difference exactly… SERVER_NAME is always the main domain with this provider, so I recalled my hosting provider suggested to use HTTP_HOST one time earlier

#4

BoldMinded (Brian)

It seems the preferred and most reliable method to use is SERVER_NAME. http://stackoverflow.com/questions/2297403/http-host-vs-server-name.

I’d suggest talking to your host provider to get SERVER_NAME configured properly.

#5

Rockyard

They say SERVER_NAME is functioning properly. I use a domain alias for this website, and redirect/rewrite to the MSM index.php via .htaccess. The MSM index.php is on the same hosting account (sub directory), so that’s why the SERVER_NAME is set to the main domain name.

It would be great if this could be switched via the settings. But I understand my configuration is a bit unusual, so I’ll try to remember it, and set it back to HTTP_HOST after every update.

#6

BoldMinded (Brian)

I’ll consider adding a setting for this, may be awhile though.

#7

BoldMinded (Brian)

Added this as an option for the next release.

Login to reply