[opencms-dev] How to use ADE in multi-site configuration on OC 10 ?
Alex Kandzior
alex at opencms.org
Thu Jun 23 14:07:31 CEST 2016
For an installation with multiple sites, you must configure OpenCms like this:
All access to the OpenCms workplace or any ADE functions must always be through the URL configured in „workplace-server“.
The configured „workplace-server“ must be a different URL then any „server“ configured for site access.
So in your case the problem is that your site1.dk <http://site1.dk/> is configured both as workplace server and as regular server.
The consistency of the links generated in OpenCms cannot be guaranteed otherwise.
In 9.x it was possible to create such a (faulty) configuration, so we added the warning in 10.
The problem in 9.x is not immediately visible because IIRC it affects only links generated between sites managed in OpenCms.
Kind regards,
Alex.
-------------------
Alexander Kandzior
Alkacon Software GmbH - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org
> Am 23.06.2016 um 12:52 schrieb Christian Bjørnbak <cbj at touristonline.dk>:
>
> We have a working 9.5 multi-site, multi-language setup which I'm trying to upgrade to 10.0.1..
>
> We have the following on opencms-system.xml:
>
> <workplace-server>http://cmsdev.site1.dk <http://cmsdev.site1.dk/></workplace-server>
> <default-uri>/sites/default/</default-uri>
> <shared-folder>/shared/</shared-folder>
> <site server="http://cmsdev.site1.dk <http://cmsdev.site1.dk/>" uri="/sites/default/" title="DEMO" position="6.0" webserver="true">
> <site server="http://dev.site2.dk <http://dev.site2.dk/>" uri="/sites/site2/" title="site2.dk <http://site2.dk/>" position="4.0" webserver="true">
> <alias server="http://dev.site2.de <http://dev.site2.de/>"/>
> <alias server="http://dev.site2.com <http://dev.site2.com/>"/>
> </site>
>
> Site1 contains the demo site as reference.
>
> Site2, Site3 (not shown) etc is the public sites.
>
> We have copied the login page from the demo site to site2 so the users can log by entering http://dev.site2.dk/login <http://dev.site2.dk/login>
>
> This way the ordinary editor don't have to enter workplace to choose a site.
>
> But no matter if I log in on http://cmsdev.site1.dk/login <http://cmsdev.site1.dk/login> or http://dev.site2.dk <http://dev.site2.dk/> seconds after I load a page error message boxes show up on the screen containing:
>
> Accessing workplace or ADE through a server which has not been configured. Your site configuration is probably incorrect.
>
> New boxes are added underneath each other with seconds interval until it occupies all of the page.
>
>
> I have tracked the error to originate from
>
> /**
> * Checks whether the workplace is accessed through the workplace server, and sends an error message otherwise.<p>
> *
> * @param request the request to check
> * @param cms the CmsObject to use
> */
> public void checkWorkplaceRequest(HttpServletRequest request, CmsObject cms) {
>
> try {
> if ((OpenCms.getSiteManager().getSites().size() > 1)
> && !OpenCms.getSiteManager().isWorkplaceRequest(request)) {
> // this is a multi site-configuration, but not a request to the configured Workplace site
>
> CmsUser user = cms.getRequestContext().getCurrentUser();
> // to limit the number of times broadcast is called for a user, we use an expiring cache
> // with the user name as key
> if (null == m_workplaceServerUserChecks.getIfPresent(user.getName())) {
> m_workplaceServerUserChecks.put(user.getName(), "");
> OpenCms.getSessionManager().sendBroadcast(
> null,
> Messages.get().getBundle(getWorkplaceLocale(cms)).key(
> Messages.ERR_WORKPLACE_SERVER_CHECK_FAILED_0),
> user);
>
> }
>
> }
> } catch (Exception e) {
> LOG.error(e.getLocalizedMessage(), e);
> }
> }
>
>
> What does this error really mean?
>
> What is the correct multi-site, multi-language setup for OC 10 where ordinary users can use ADE without entering workplace?
>
> Can I remove the message without doing a custom compilation of OC 10?
>
> Med venlig hilsen / Kind regards,
>
> Christian Bjørnbak
>
> Chefudvikler / Lead Developer
> TouristOnline A/S
> Islands Brygge 43
> 2300 København S
> Denmark
> TLF: +45 32888230
> Dir. TLF: +45 32888235
> _______________________________________________
> 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/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20160623/9dba646a/attachment.htm>
More information about the opencms-dev
mailing list