[opencms-dev] Frontend login and direct edit
Claus Priisholm
cpr at codedroids.com
Mon Aug 17 15:23:23 CEST 2009
Great detective work :-)
That would certainly explain the issue I ran into.
It may make sense in some setups to have user for a given site to be
"limited" to do direct edit inside his "default" site, but in the
scenario I was aiming at back then, it would not have worked. There a
couple of super users were expected to edit both sites and preferably
though this simplified direct edit driven front-end. So they would have
needed to "switch" default site in their user settings for it to work...
I guess it is not a common setup but I would say that having a common
users database for two sites is one of the reasons to go with a
multi-site setup rather than separate OpenCms instances. Have you added
it to bugzilla?
Ludwig wrote:
> Today I had time for investigating a little bit more.
> I figured out: If the user's default site points to the site in which
> the file should be edited everything works fine.
>
> This has something to do with the initialization of the workplace.
> Class org.opencms.workplace.CmsWorkplace#initWorkplaceCmsContext(...)
>
> ...
> // check site setting
> if (!(settings.getSite().equals(reqCont.getSiteRoot()))) {
> // site was switched, set new site root
> reqCont.setSiteRoot(settings.getSite());
> // removed setting explorer resource to "/" to get the
> stored folder
> }
>
> Here the current site of the requestContext is overwritten with the site
> of an initially created CmsWorkplaceSettings object.
>
> Maybe this message helps somebody with the same problem or even it is an
> inspiration for the opencms development team for changing this behaviour
> of opencms ;-)
>
>
> All the best,
> Ludwig
>
> Am 10.08.2009 um 11:05 schrieb Claus Priisholm:
>
>> It rings a bell... I had a similar problem with version 6. I did use the
>> mod_jk rewrite setup, but I seem to recall that problem persisted when
>> testing directly on tomcat (same port, but a different entry different
>> from "default" in the sites-folder). I.e. both sites and the workplace
>> editor used the same "base" url.
>>
>> As I recall it there were some parts during direct edit that would try
>> to look up stuff from /sites/default even though it everything was
>> stored in the other site. I never found the actual problem though as it
>> turned out the two sites were better of running as separate OpenCms
>> instances (so each had their own /sites/default).
>>
>> So no solution, but if you have Firefox I would suggest to install
>> HttpFox and look at what is being requested - it sounds like one or more
>> requests ends up on the wrong path. Also try the setup without the fancy
>> front-end setup (as mentioned I recall that I still had the problem, but
>> it was in version 6 so it could be that whatever caused the problem then
>> has been fixed in 7, and it may be something entirely different bugging
>> your setup)
>>
>> Ludwig wrote:
>>> Hi all,
>>>
>>> has anybody got experiences with a frontend- login and directedit
>>> functionality in the non-default site? (OpenCms 7.5)
>>>
>>> My situation:
>>>
>>> I have got a site /sites/xyz and use a login form, based on the
>>> login.jsp of the templatetwo demo content. Site xyz is reachable over
>>> the domain http://localhost:8081. The domain of the default site and
>>> the workplace is http://localhost:8080.
>>>
>>> Problem:
>>>
>>> The login works perfectly fine but editing content through directedit
>>> doesn't work. If I try to do so the editor.jsp just redirects me back
>>> to where I come from without showing the editor- form.
>>>
>>> I assume that this behaivour is in connection with the fact that I'm
>>> even after login "under" the localhost:8081 URL. But if I try to
>>> manually switch to localhost:8080 (URL of the workplace) I run into
>>> other problems while trying to use directedit (then the site switches
>>> from xyz to default).
>>>
>>>
>>> Has anybody faced similiar problems and solved them?
>>>
>>>
>>>
>>> Thanks a lot & regards,
>>> Ludwig
>>>
>>> --
>>> Ludwig Hunecke
>>> Kramerstr. 18
>>> D-38122 Braunschweig
>>> Tel.: +49 (151) 14818950
>>> GnuPG Key-ID: 8CEAB267
>>>
>>>
>>> _______________________________________________
>>> This mail is sent to you from the opencms-dev mailing list
>>> To change your list options, or to unsubscribe from the list, please
>>> visit
>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>
>>
>> --
>> Claus Priisholm, CodeDroids ApS
>> Phone: +45 48 22 46 46
>> cpr (you know what) codedroids.com - http://www.codedroids.com
>> cpr (you know what) interlet.dk - http://www.interlet.dk
>> --
>> Javadocs and other OpenCms stuff:
>> http://www.codedroids.com/community/opencms
>>
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
--
Claus Priisholm, CodeDroids ApS
Phone: +45 48 22 46 46
cpr (you know what) codedroids.com - http://www.codedroids.com
cpr (you know what) interlet.dk - http://www.interlet.dk
--
Javadocs and other OpenCms stuff:
http://www.codedroids.com/community/opencms
More information about the opencms-dev
mailing list