CMFUrlSkinSwitcher works beautifully for me with http
websites. But it
has problems dealing with https sites.
I am using Plone 2.0.3 and CMFUrlSkinSwitcher 1.0rc1.
The first problem was that it always used the "visitor"
skin when
accessing an https site, regardless of the site's url.
(For example
http://edit.site.com --> editor skin; but
https://edit.site.com -->
visitor skin.) A patch is attached that fixes this
problem.
Second problem is more confusing (to me). With my
patch applied, the
editor skin is selected for https://edit.site.com just
as it should be.
But, when I login or logout of the site, I am sent to
https://www.site.com/login_phase2 (or /logout_phase2).
Which is an
extra big problem, since www.site.com only accepts http
requests.
I looked through the code trying to figure this one
out, but it's over
my head.
It may be helpful to note that, while all other links
on
https://edit.site.com point to the right location, the
"logout" link at
the top (next to "preview") points to
https://www.site.com. I tried
going to the Actions tab of portal_skinswitcher in the
ZMI, and changing
the Action for Name "Log In" from
python:portal.portal_skinswitcher.getPortalsAbsoluteUrl("visitor")+"/login_form"
to
python:portal.portal_skinswitcher.getPortalsAbsoluteUrl("editor")+"/login_form"
That fixed the links at the top of the page. But when
logging in, I
still get directed to https://www.site.com/login_phase2
.
improved patch