Theme not applied using VHM with _vh_ parts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xdv |
Fix Released
|
Undecided
|
Marshall Scorcio |
Bug Description
The issue is that if you are accessing the site using the VHM and have provided 2 or more _vh_ parts in your virtual path, then xdv fails to theme the domain. Removing the _vh_ parts will fix the problem (but then your links will be broken).
The problem is caused by the fact that if there are at least 2 _vh_ parts of the VH URL, then 'BASE0' will contain all but the last of these parts. For example, accessing:
http://
Will give a BASE0 of:
However, XDV currently only chops off the scheme part of BASE0, so the location actually remains and must be specified as part of the domain in XDV (eg. localhost/foo). So, when you enter localhost as a domain to theme, it isn't themed because it tries to match localhost against localhost/foo.
I've attached a patch that simply strips off the end of BASE0 as well (everything after and including the first '/').
Another solution (if the current behaviour is actually preferred) may be to simply change the wording in the "Domains" text area so it is clearer that you may need to enter a location as well and/or document this behaviour somewhere.
Steps To Reproduce:
1. Set up collective.xdv to theme localhost
2. Set up Apache to redirect localhost to Plone using VHM, but with a "virtual path" part (using _vh_*) - eg:
RewriteRule ^/foo/bar/(.*) http://
3. Navigate to http://
Expected Behaviour: The site will be Themed
Actual Behaviour: It is not themed
Changed in xdv: | |
assignee: | nobody → Marshall Scorcio (marshalium) |
Changed in xdv: | |
status: | New → Fix Committed |
Changed in xdv: | |
status: | Fix Committed → Fix Released |
FYI: This is for collective.xdv. I was directed here from http:// plone.org/ products/ collective. xdv's Issue Tracker link. Hoping this is the right place.