Subdomain Path to Contao Issue v2.10.4
Okay, I'm seeing an issue with Contao in v2.10.4 that I haven't run across before. We use a number of demonstrator Contao installs with different graphics themes in subdomain as in "http://blueocean.frontwavewebsites.com".
Over the weekend, after performing an upgrade to v2.10.4, I was unable to get Contao to load as it had before with the 'Path to Contao" settings we had been using previously:
HTACCESS
Code:
#RewriteBase /blueocean
LOCAL CONFIG
Code:
$GLOBALS['TL_CONFIG']['websitePath'] = ' ';
Using this setup, Contao showed an error with an unresolvable server conflict:
Quote:
The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept cookies.
After several hours experimentation and checking the subdomain setup (it was correct in the cpanel), I can get the Contao to load and function as an ordinary folder URL as in:
http://www.frontwavewebsites.com/blueocean/
but not as a "subdomain" using this path:
HTACCESS
Code:
RewriteBase /blueocean
LOCAL CONFIG
Code:
$GLOBALS['TL_CONFIG']['websitePath'] = '/blueocean';
I've tried multiple combinations of the path statement to no avail, the one above lets me load the script as an ordinary folder even though it is still functioning as a subdomain. I'm not sure where this error is coming in, but it seems to have been introduced in v2.10.4 and it is appearing on two separate servers.
Anybody else running into issues with current release Contao deployed in a subdomain? Any suggestions would be appreciated.
Ernest McDermon
Snellville, GA
Re: Subdomain Path to Contao Issue v2.10.4
Only thing I can think of is this (from Changelog)
- Fixed: the Environment class did not always return the correct script name (#3603)
The htaccess file is identical to 2.10.3
Re: Subdomain Path to Contao Issue v2.10.4
I have the same issue the base url is allways subdomain.example.com/subdomain.example.com and not subdomain.example.com. No matter what I do with htaccess or localconfig the base url isn't right.
This happens only with subdomains, and I have the version with #3603 fix.
Any clue?
Re: Subdomain Path to Contao Issue v2.10.4
@ernestmcd:
Is there a blank in the website path?
Code:
$GLOBALS['TL_CONFIG']['websitePath'] = ' ';
Did you map the subdomain to the respective folder in your cpanel?
Re: Subdomain Path to Contao Issue v2.10.4
Thanks for the comeback, I'm glad somebody else is having the same issue.
I spent several hours trying to resolve this without success. Like you, I tried various combinations of .htaccess settings and localconfig.php settings - no joy on any front.
This must be a "bug" in the code somewhere, I'm guessing around 2.10.3 update? I really didn't notice this until I upgraded some demo sites to 2.10.4 that had been installed successfully in subdomains previously with v2.9.5.
In every instance that I've run into this error, Contao 2.10.x treats the subdomain as a folder, rather than a true subdomain.
Perhaps the impending update to 2.11.0 will resolve this issue. Its probably going to be something very simple in the code base that is causing the error. If anybody else has any ideas on this problem, I would be happy to hear their thoughts and suggestions.
Ernest McDermon
Snellville, GA
Re: Subdomain Path to Contao Issue v2.10.4
Why not report the bug? I'm sure that might shed some light.
Re: Subdomain Path to Contao Issue v2.10.4
Quote:
Originally Posted by xchs
@ernestmcd:
Is there a blank in the website path?
Code:
$GLOBALS['TL_CONFIG']['websitePath'] = ' ';
Did you map the subdomain to the respective folder in your cpanel?
No, I double checked this, there is no blank space in the website path, and the behavior is as I described.
The subdomain is mapped properly to the folder without redirection. I have a v2.9.5 site on the same server that is working properly with the subdomain:
http://celticsea.frontwavewebsites.com/ and it is mapped to
Root Domain:
Code:
celticsea.frontwavewebsites.com
Document Root:
Code:
public_html/celticsea
The blueocean site is Contao v2.10.4 and it will only only load as
http://www.frontwavewebsites.com/blueocean/index.php and it is mapped to
Root Domain:
Code:
blueocean.frontwavewebsites.com
Document Root:
Code:
public_html/blueocean
Ernest McDermon
Snellville, GA
Re: Subdomain Path to Contao Issue v2.10.4
Have you specified this subdomain URL in the field "Domain name" of your "Website root" page?
Then, of course, you should set the RewriteBase in your ".htaccess" to:
Re: Subdomain Path to Contao Issue v2.10.4
Quote:
Originally Posted by Ruud
Why not report the bug? I'm sure that might shed some light.
I haven't had much luck reporting bugs in the Contao platform. If it doesn't reproduce on the Unix server that the Contao demo is loaded on, it doesn't exist unless a developer with a solid relationship with the European development team can document it as well.
I'm waiting for the 2.11.0 update to see if it continues, and I'll report the (suspected) bug then. It is only an issue on my demo sites, but I would like to get this resolved. Obviously I'm not the only one seeing it either.
Ruud, as always it is a pleasure to hear from you.
Best wishes,
Ernest McDermon
Snellville, GA
Re: Subdomain Path to Contao Issue v2.10.4
Quote:
Originally Posted by xchs
Have you specified this subdomain URL in the field "
Domain name" of your "
Website root" page?
Then, of course, you should set the RewriteBase in your ".htaccess" to:
That suggestion broke the site. I'll have to repair the blueocean demo site now. Anybody reading this thread DO NOT DO THIS ON THE HTACCESS FILE!!!
Re: Subdomain Path to Contao Issue v2.10.4
Quote:
Originally Posted by ernestmcd
That suggestion broke the site. I'll have to repair the blueocean demo site now. Anybody reading this thread DO NOT DO THIS ON THE HTACCESS FILE!!!
I'm sorry to have to say this but this never ever "broke" a site so that you have to do a "REPAIR"???? What means you have to do a "REPAIR"? If - as you say - this setting will not work for you and on your site/server, just comment this line out and everything is just as you had before...
And another sorry, but I have this done already many many times before and it worked always like a charm (assuming, of course, if you are doing this properly!).
Not sure what you have done and set until now, but this works for me in any case:
- Map the subdomain to the respective subdirectory:
Code:
http://subdomain.example.com ---> folder where you have installed Contao
[/*:m:28q8dsnn] - Run the Contao Install tool to set the WebsitePath automatically. It should be (without any blanks):
Code:
$GLOBALS['TL_CONFIG']['websitePath'] = '';
[/*:m:28q8dsnn] - Set the RewriteBase in your ".htaccess" file to:
And, of course, read the comments in the ".htaccess" file, too!
[/*:m:28q8dsnn] - If you are using Contao in a multi-domain environment you might have to set the field "Domain name" as mentioned already before[/*:m:28q8dsnn]