[opencms-dev] (Template for) XmlPages in V 10.5.0

Schliemann, Kai K.Schliemann at comundus.com
Mon Feb 20 11:28:41 CET 2017


Hi Gerd,
I can confirm, that it works on a 9.5.x installation and I am pretty sure, it should work in 10.5. too.
I would recommend to install the org.opencms.welcome module from a 7.0.x release. It contains a complete xmlpage based template and demo content.
I think, this will explain a lot.
If you need the module zip, let me know.
HTH
Best regards
Kai

Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Gerd Schrick
Gesendet: Freitag, 17. Februar 2017 01:12
An: opencms-dev at opencms.org
Betreff: [opencms-dev] (Template for) XmlPages in V 10.5.0


Dear All,

someone out there who is using XmlPages in Version 10.5 and can confirm that it works? I'm at least a bit lost in regard to this ;-)

For couple of reasons I'd like to (also) use XmlPages for my testsite; one is that the Extended HTML Import does perfectly meet my needs and works well for me, but it only supports xmlpages.

After commenting in the xmlpage explorertype block in config/opencms-workplace.xml it's now possible to use the xmlpages in the Workplace (Explorer, Sitemap) edit and also create them w/o any problems.

But when it comes to use them on the site I'm stuck with it since some days now.

I built the testsite mainly according to the documentation (Tutorial "multilingual site", SingleTree, en, de, fr) and have a simple ContainerPage template with one container only (for the main content) plus two included JSPs for navigation <cms:include .../> what works well (for ContainerPages).

As template for the XmlPages I just copied the one for ContainerPages and changed the following:
instead of (the single) <cms:container .../> I use <cms:include element="body" editable="true"/>
and instead of <cms:enable-ade/> in head I use <cms:editable/>
And according to what I found in the web, that should work ... but it does not. :-(
(yes, the template property of each XmlPage is set to the right template /system/modules/....)

When I display the page (offline) it gets rendered to the point where the <cms:include /> is and none of the content from the XmlPage is shown. An Error-popup is show (see below). But funnily enough, after I click it away I can click on the edit point, get to the Editor (TinyMCE) and can edit the page. After save and close, then the same as before.

The error is (from the log):

ERROR [  org.opencms.main.OpenCmsCore:2185] getWriter() has already been called for this response rendering URL http://arisnb4:8081/opencms/opencms/en/issues/2007/index.html
java.lang.IllegalStateException: getWriter() has already been called for this response
    at org.apache.catalina.connector.Response.getOutputStream(Response.java:575)
    at org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFacade.java:194)
    at org.opencms.loader.A_CmsXmlDocumentLoader.service(A_CmsXmlDocumentLoader.java:244)
    at org.opencms.loader.CmsXmlPageLoader.service(CmsXmlPageLoader.java:44)
:

I understand the error from the servlet (container) point, but have no clue, what might cause it!?

I already tried so many things, but without success.
Without the <cms:include /> there's no error
Also removed ... all the other includes (navigation), the <cms:editable/>, the editable="true" attribute ... still the same.
inlcuding a simple JSP works
(<cms:include file="/system/modules/epo.epooj.template/elements/test-include.jsp" editable="true"/>)
but instead using the hardcoded url to one of the XmlPages does not work again.

The super-confusing part is, that it already worked (the content was shown/included)! After I started with the import some days ago I only replaced the <cms:container with the <cms:include in the ContainerPage template, then the XmlPage content was there and I get an error with ContainerPages (obviously); but now also this does not work anymore.
Since then I just enhanced the navigation in the template and installed and deleted only some documentation modules (7.0.0 and 9.5.5) what I can't imagine to be the cause.

The only remaining idea now is to try it again with a fresh installation; no big issue, but I'd better like to understand (and solve) the cause.

Is there something more needed to (re)activate support for the XmlPage type than what I did in config/opencms-workplace.xml (see above)?
If so, what is it and how to do it (where to find the infos)?



Already many thanks for any help!

Gerd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170220/06b7a557/attachment.htm>


More information about the opencms-dev mailing list