[opencms-dev] V 10.5.0 - Extended HTML Import
Alex Kandzior
alex at opencms.org
Mon Feb 13 08:51:24 CET 2017
Gerd,
the extended HTML import function you are trying to use is - in it's current implementation - compatible only with XmlPages.
The XmlPage technology has been replaced by the ContainerPage technology between OpenCms 7 and 8.
XmlPages where using large chunks of (quite unstructured) HTML blobs to create a page. These blobs where stored inside of the page itself.
Container pages today contain just pointers to a set of content elements. Each content element is a structured XML content stored in a separate file.
For backward compatibility, XmlPages are still supported in OpenCms today BUT the templates and demos all use container pages.
You need to enable support for XmlPages first by adding the configuration for this resource type in openms-vfs.xml and also opencms-workplace.xml.
You would then need to create an XmlPage compatible template in order to see the imported XmlPages displayed.
Maybe another approach for content migration is more suitable:
I have no idea about how your content is structured in Lenya, but IIRC Lenya also was XML based with XSLT transformation.
Maybe you can try to transform your existing contents directly to OpenCms XML content types by XSLT?
Kind regards,
Alex.
-------------------
Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org
> Am 12.02.2017 um 23:48 schrieb Gerd Schrick <mail at schrick-design.de>:
>
> Dear List,
>
> a short introduction:
> after about 10 years of intensive develop and maintenance work for a large website + mobile and some smaller (still productive) with the Open Source CMS "Apache Lenya" (and Cocoon 2.1) I re-discovered OpenCms (used it about 13 yrs ago for some smaller sites) as a potential replacement for Lenya.
> Already evaluated some other in theory and "quickly" tested some of them (Hippo amongst others).
> I really was impressed by what I read about OpenCms (partly unbelivable ;-) and about 2 weeks ago i finally installed it (Arch Linux, MariaDB, Java 8, Tomcat 8) ... and the more I play with it the more I love it :-)
>
> My question or "problem" regards to the "Extended HTML Import":
>
> I installed the official 10.5.0 release with the default settings including the Apollo Example.
> With help of the good documentation I've set up an additional site (my evaluation prototype) for three languages (de, en, fr; SingleTree) with just a simple Template (+ Model) with only one Container.
> This works very well.
>
> To kind of "finalize" my prototype and show it to the customer I need to fill it with content (about 1.500 documents, each html in 3 langs + a PDF per doc)).
>
> With a small amount of testpages (6 folder + 5 docs + 5 PDFs) I tried the Extended HTML Importer.
> After adding "head|Head Element,body|Body Element,foot|Foot Element" to the template's "template-elements" property (found this hint somewhere in the I-net) the import run was successfull w/o errors.
>
> BUT:
>
> - the imported content/page is only shown when I use <cms:include element="body" editable="true"/> instead of <cms:container .../> (else I get an error) but this way the created (not imported) content is not shown (obviously)
>
> - no edit option in the page editor available
>
> - in EXPLORER I can't navigate to the imported data; when expanding the parent folder (subfolder in my prototype site) the arrow in front of the the folder icon rotates to point downward but nothing happens; on hover (over the folder) a kind of tooltip shows in red an Exception. In the OpenCms log I found:
> ERROR [din.server.DefaultErrorHandler: 58]
> java.lang.NullPointerException
> at org.opencms.ui.components.CmsResourceIcon.getSmallTypeIconURI(CmsResourceIcon.java:393)
> at org.opencms.ui.components.CmsResourceIcon.getIconInnerHTML(CmsResourceIcon.java:300)
> :
> and
> ERROR [encms.ui.CmsVaadinErrorHandler: 80]
> Invocation of method itemClick in org.opencms.ui.apps.CmsFileExplorer$9 failed.
> com.vaadin.event.ListenerMethod$MethodException: Invocation of method itemClick in org.opencms.ui.apps.CmsFileExplorer$9 failed.
> at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:533)
> :
>
> - in the SITEMAP I can navigate to the imported data (an icon with'?' is shown for the imported pages) and in "Resources" view I see all the folders, pages and PDFs in the correct structure, and can access/edit (props) the folders and PDFs BUT NOT the imported HTML pages; when accessing their PROPERTIES or INFO:
> the dialog shows: "java.lang.NullPointerException: No description available."
> and the log:
> ERROR [ org.opencms.gwt.CmsGwtService: 183]
> java.lang.NullPointerException
> at org.opencms.gwt.CmsVfsService.addPageInfo(CmsVfsService.java:345)
> :
> and
> ERROR [ org.opencms.gwt.CmsLogService: 66] Client LOG (Host 192.168.178.41, Address 192.168.178.41, Ticket 1486935332797): null
> org.opencms.gwt.CmsVfsService.addPageInfo(CmsVfsService.java:345)
> :
>
> For testing, I imported the 7.0.0 documentation module + the documentation for the Extended HTML Import and XMLContent what shows the same behaviour in Explorer and Sitemap.
>
>
>
> Have I missed something to add/configure?
> Is this import feature incompatible with version 10.5.0?
>
> Stumbled over the class
> https://github.com/alkacon/opencms-core/blob/branch_10_5_x/src-modules/org/opencms/workplace/tools/database/CmsHtmlImport.java <https://github.com/alkacon/opencms-core/blob/branch_10_5_x/src-modules/org/opencms/workplace/tools/database/CmsHtmlImport.java>
> that it guess this handling the import (is this correct?) ...
> detected there (line 1137) that a "CmsXmlPage" page is created ...
> and it seems to me as if there is no (more) support for the "xmlpage" resourcetype in 10.5.0 what causes the issue (I'm just guessing, as I didn't found a way to create a "XmlPage" in the system, only a ContainerPage with XmlContent).
>
>
>
> Is there a way to get this working somehow? maybe some kind of "hack" afterwards in the DB (changing some values)?
> For the prototype it does not have to be perfect.
> Also thought about a custom build (already set up the environment as described and git-cloned the core :-) or to create an import module based on the Extended HTML Import code ...
>
>
>
> Sorry for the long but hopefully explanatory text.
>
> Thank you very much for your help on this!
>
> Best regards,
> Gerd
>
> _______________________________________________
> 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/20170213/822ba350/attachment.htm>
More information about the opencms-dev
mailing list