[opencms-dev] opencms-dev Digest, Vol 153, Issue 3

Atle Enersen atle.enersen at gmail.com
Tue Jul 8 13:51:14 CEST 2025


Thaks agai, Michael.

Here it is:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

	<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>

	<xsd:element name="EnersenArticleNormalData" type="OpenCmsEnersenArticleNormalData"/>

	<xsd:complexType name="OpenCmsEnersenArticleNormalData">
		<xsd:sequence>
			<xsd:element name="EnersenArticleNormal" type="OpenCmsEnersenArticleNormal" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="OpenCmsEnersenArticleNormal">
		<xsd:sequence>
			<xsd:element name="Title" type="OpenCmsString" />
			<xsd:element name="RealAuthorName" type="OpenCmsString" />
			<xsd:element name="RealAuthorEmail" type="OpenCmsString" />
			<xsd:element name="Teaser" type="OpenCmsHtml" />
			<xsd:element name="Ingress" type="OpenCmsHtml" />
			<xsd:element name="Body" type="OpenCmsHtml" />
			<xsd:element name="DatePublish" type="OpenCmsDateTime" />
			<xsd:element name="DateVisible" type="OpenCmsDateTime" />
			<xsd:element name="DateUnpublish" type="OpenCmsDateTime" />
			<xsd:element name="Categories" type="OpenCmsDynamicCategory" />
			<xsd:element name="ImageTop" type="OpenCmsVfsFile" />
			<xsd:element name="ImageTopText" type="OpenCmsHtml" />
			<xsd:element name="ImageBottom" type="OpenCmsVfsFile" />
			<xsd:element name="ImageBottomText" type="OpenCmsHtml" />
			<xsd:element name="LinkURI" type="OpenCmsVarLink" />
			<xsd:element name="DisplayOrder" type="OpenCmsString" />
		</xsd:sequence>
		<xsd:attribute name="language" type="OpenCmsLocale" use="required"/>
	</xsd:complexType>

	<xsd:annotation>
		<xsd:appinfo>
		    <resourcebundles>
                <propertybundle name="org.enersen.core.messages" />
            </resourcebundles>
			<FieldSettings>
                <Setting>
                    <PropertyName>Title</PropertyName>
                    <Mapping>
                       <MapTo>property:Title</MapTo>
                       <UseDefault>true</UseDefault>
                    </Mapping>
                    <DisplayName><![CDATA[%(key.label.Title)]]></DisplayName>
                    <Description><![CDATA[%(key.label.Title.help)]]></Description>
                    <Widget>string</Widget>
                    <Default><![CDATA[%(key.type.enersenarticlenormal.title)]]></Default>
                    <Search>listtitle</Search>
                </Setting>
                <Setting>
                    <PropertyName>RealAuthorName</PropertyName>
                    <Widget>string</Widget>
                    <Default>Navn Navnesen</Default>
                </Setting>
                <Setting>
                    <PropertyName>RealAuthorEmail</PropertyName>
                    <Widget>string</Widget>
                    <Default>Epostadresse</Default>
                </Setting>
                <Setting>
                    <PropertyName>Teaser</PropertyName>
                    <Widget>html</Widget>
                    <WidgetConfig><![CDATA[height:600px,link,anchor,source,downloadgallery,formatselect]]></WidgetConfig>
                </Setting>
                <Setting>
                    <PropertyName>Ingress</PropertyName>
                    <Widget>html</Widget>
                    <WidgetConfig><![CDATA[height:600px,link,anchor,source,downloadgallery,formatselect]]></WidgetConfig>
                </Setting>
                <Setting>
                    <PropertyName>Body</PropertyName>
                    <Widget>html</Widget>
                    <WidgetConfig><![CDATA[height:800px,link,anchor,source,downloadgallery,formatselect]]></WidgetConfig>
                </Setting>
                <Setting>
                    <PropertyName>DatePublish</PropertyName>
                    <Widget>datetime</Widget>
                    <Default><![CDATA[%(currenttime)]]></Default>
                    <Search>listdate</Search>
                </Setting>
                <Setting>
                    <PropertyName>DateVisible</PropertyName>
                    <Widget>datetime</Widget>
                    <Default><![CDATA[%(currenttime)]]></Default>
                    <Search>listdate</Search>
                </Setting>
                <Setting>
                    <PropertyName>DateUnpublish</PropertyName>
                    <Widget>datetime</Widget>
                    <Default><![CDATA[%(currenttime)]]></Default>
                    <Search>listdate</Search>
                </Setting>
                <Setting>
                    <PropertyName>Categories</PropertyName>
                    <Widget>category</Widget>
                    <WidgetConfig>onlyleafs=false</WidgetConfig>
                    <Search>false</Search>
                </Setting>
                <Setting>
                    <PropertyName>ImageTop</PropertyName>
                    <Widget>imagegallery</Widget>
                    <WidgetConfig>{useformat:true}</WidgetConfig>
                    <Search>false</Search>
                </Setting>
                <Setting>
                    <PropertyName>ImageTopText</PropertyName>
                    <Widget>html</Widget>
                    <WidgetConfig><![CDATA[height:600px,link,anchor,source,downloadgallery,formatselect]]></WidgetConfig>
                </Setting>
                <Setting>
                    <PropertyName>ImageBottom</PropertyName>
                    <Widget>imagegallery</Widget>
                    <WidgetConfig>{useformat:true}</WidgetConfig>
                    <Search>false</Search>
                </Setting>
                <Setting>
                    <PropertyName>ImageBottomText</PropertyName>
                    <Widget>html</Widget>
                    <WidgetConfig><![CDATA[height:600px,link,anchor,source,downloadgallery,formatselect]]></WidgetConfig>
                </Setting>
                <Setting>
                    <PropertyName>LinkURI</PropertyName>
                    <Widget>file</Widget>
                    <Search>false</Search>
                    <Display>singleline</Display>
                </Setting>
                <Setting>
                    <PropertyName>DisplayOrder</PropertyName>
                    <Widget>string</Widget>
                    <Default>0</Default>
                </Setting>
            </FieldSettings>
		</xsd:appinfo>
	</xsd:annotation>

</xsd:schema>

Best regards/Vennlig hilsen, Atle Enersen 
-- 

Tel.: +47 48 06 31 71 

------------------------------


Message: 2
Date: Tue, 8 Jul 2025 09:50:54 +0200
From: Michael Emmerich <m.emmerich at alkacon.com <mailto:m.emmerich at alkacon.com>>
To: opencms-dev at opencms.org <mailto:opencms-dev at opencms.org>
Subject: Re: [opencms-dev] opencms-dev Digest, Vol 153, Issue 2
Message-ID: <7035ae9b-8b11-4536-812c-4bfa309d4d49 at alkacon.com <mailto:7035ae9b-8b11-4536-812c-4bfa309d4d49 at alkacon.com>>
Content-Type: text/plain; charset=UTF-8; format=flowed


Hello Atle,


this sounds as if the xsd is not correct. Can you post it here so that I 
can take a look at it?




Kind regards,


Michael


Am 08.07.25 um 08:41 schrieb Atle Enersen via opencms-dev:
> Hello, Michael, and thanks for the reply.
>
> I was not aware of the mapping option. I did the change desired:
>
> <Mapping>
> <MapTo>property:Title</MapTo>
> <UseDefault>true</UseDefault>
> </Mapping>
>
> When this was done I published directly and then I used the "Page editor" for the "House"-menu on the site "Enersen" from the Websites screen. It produces this error message:
>
> Kritisk feil: Unable to unmarshal XML content definition schema "opencms://system/modules/org.enersen.core/schemas/enersenarticlenormal.xsd".
>
> (Kritisk feil = Critical error)
>
> When choosing the "Demo site" it works. I get the Mercury frontpage and the editing toolbar.
>
> Ok, then I went on trying to edit one content object of the resource type of the content. In the menu (left hans side click) there is noe dit option. When I do the same on another Resource Types content it works. The external site pruces a 404. Admin interface apart from the described works fine.
>
> Smething now seems in some way regarding the XSD of the Resource type?
>
> Best regards/Vennlig hilsen, Atle Enersen


-- 
Michael Emmerich


-------------------


Alkacon Software GmbH & Co. KG - The OpenCms Experts
http://www.alkacon.com <http://www.alkacon.com>






------------------------------


Subject: Digest Footer


_______________________________________________
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
https://lists.opencms.org/mailman/listinfo/opencms-dev <https://lists.opencms.org/mailman/listinfo/opencms-dev>




------------------------------


End of opencms-dev Digest, Vol 153, Issue 3
*******************************************




More information about the opencms-dev mailing list