|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
Probleme when editing an OpenCmsString with HtmlWidget definedHi guys,
I have a little Problem with an OpenCms 7.05 Installation regarding the editing of content. I have a content-element "TextField" which is an OpenCmsString, but have defined to use the HtmlWidget for editing that "TextField" (see below) <xsd:complexType name="OpenCmsHomeSite"> <xsd:sequence> <xsd:element name="HeadImage" type="OpenCmsVfsFile" /> <xsd:element name="TextField" type="OpenCmsString" /> <xsd:element name="Download" type="OpenCmsDownload" minOccurs="1" maxOccurs="unbounded" /> <xsd:element name="Relativetheme" type="OpenCmsRelativeTheme" minOccurs="1" maxOccurs="unbounded" /> <xsd:element name="Contact" type="OpenCmsContact" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> <xsd:attribute name="language" type="OpenCmsLocale" use="required" /> </xsd:complexType> <xsd:annotation> <xsd:appinfo> <mappings/> <layouts> <layout element="TextField" widget="HtmlWidget" configuration="source" /> </layouts> <validationrules/> <defaults/> </xsd:appinfo> </xsd:annotation> On random Occasions when opening an index.html of that schema not the HtmlWidget is used, but the "normal" Html-Input for OpenCmsString elements is used. In Addition the HTML-Content is shown while having been URLEncoded. Has anyone expierienced a problem like this or knows how to avoid such a thing? Where in the Source is it determined which HTML to use when creating the HTML for editing the content? Thanks in advance! Eska |
|||||||||||
|
|
Re: Probleme when editing an OpenCmsString with HtmlWidget definedHi Eska
In your schema, try changing the line <xsd:element name="TextField" type="OpenCmsString" /> to <xsd:element name="TextField" type="OpenCmsHtml" /> I believe that will solve your problem. Cheers, Paul > -----Original Message----- > From: opencms-dev-bounces@... > [mailto:opencms-dev-bounces@...] On Behalf Of Eska > Sent: 10. juni 2009 14:10 > To: opencms-dev@... > Subject: [opencms-dev] Probleme when editing an OpenCmsString > with HtmlWidget defined > > > Hi guys, > > I have a little Problem with an OpenCms 7.05 Installation > regarding the > editing of content. > > I have a content-element "TextField" which is an > OpenCmsString, but have > defined to use > the HtmlWidget for editing that "TextField" (see below) > > <xsd:complexType name="OpenCmsHomeSite"> > <xsd:sequence> > <xsd:element name="HeadImage" > type="OpenCmsVfsFile" /> > <xsd:element name="TextField" > type="OpenCmsString" /> > <xsd:element name="Download" > type="OpenCmsDownload" minOccurs="1" > maxOccurs="unbounded" /> > <xsd:element name="Relativetheme" > type="OpenCmsRelativeTheme" > minOccurs="1" maxOccurs="unbounded" /> > <xsd:element name="Contact" > type="OpenCmsContact" minOccurs="0" > maxOccurs="unbounded" /> > </xsd:sequence> > <xsd:attribute name="language" > type="OpenCmsLocale" use="required" /> > </xsd:complexType> > <xsd:annotation> > <xsd:appinfo> > <mappings/> > <layouts> > <layout element="TextField" > widget="HtmlWidget" configuration="source" > /> > </layouts> > <validationrules/> > <defaults/> > </xsd:appinfo> > </xsd:annotation> > > On random Occasions when opening an index.html of that schema not the > HtmlWidget is > used, but the "normal" Html-Input for OpenCmsString elements > is used. In > Addition the HTML-Content > is shown while having been URLEncoded. > > Has anyone expierienced a problem like this or knows how to > avoid such a > thing? > Where in the Source is it determined which HTML to use when > creating the > HTML > for editing the content? > > Thanks in advance! > > Eska > -- > View this message in context: > http://www.nabble.com/Probleme-when-editing-an-OpenCmsString-w > Sent from the OpenCMS - Dev mailing list archive at Nabble.com. > > > _______________________________________________ > 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 |
|||||||||||
|
|
Re: Probleme when editing an OpenCmsString with HtmlWidget definedYeah, I know that could make it easier, but I need an OpenCmsString there and the strange thing is, that it happens randomly and if something goes wrong, the content is URLEncoded. It shows e.g. %3Ch1+style%3D%5C%22margin%3A+20px+0px+0px+25px%3B+font-size%3A+14px%3B%5C%22%3EOnline+Beispiel+der+PHP-Funktion+urldecode%28%29%3C%2Fh1%3E%0D%0A%0D%0A instead of <h1 style=\"margin: 20px 0px 0px 25px; font-size: 14px;\">Online Beispiel der PHP-Funktion urldecode()</h1> In the "wrong" Input-Field. Eska |
|||||||||||
|
|
Re: Probleme when editing an OpenCmsString with HtmlWidget definedHi Guys,
does any of you know if there might be a reason, why CmsDefaultXmlContentHandler#getWidget(I_CmsXmlContentValue value) might return a different Widget at one time than another? The Strange thing is, that after a reinitialization of the Workspace everything is back to normal again. Thanks Eska
|
|||||||||||
|
|
Re: Probleme when editing an OpenCmsString with HtmlWidget definedHi Eska,
that method returns a different widget for a different value ;-). But if you are talking about different widgets returned for the same value... It could be that you have copied an XSD from one resource type to create another one and forgot to rename all the outer names ending up with same - looking XML. There is some caching (for layouts, mappings,...) depending on the XML names. Kind Regards, Achim. ------------------- Achim Westermann Alkacon Software GmbH - The OpenCms Experts http://www.alkacon.com - http://www.opencms.org Eska schrieb: > Hi Guys, > > does any of you know if there might be a reason, why > CmsDefaultXmlContentHandler#getWidget(I_CmsXmlContentValue value) > might return a different Widget at one time than another? > > The Strange thing is, that after a reinitialization of the Workspace > everything > is back to normal again. > > Thanks > > Eska > > > > > Eska wrote: >> >> Paul-Inge Flakstad wrote: >>> Hi Eska >>> >>> In your schema, try changing the line >>> <xsd:element name="TextField" type="OpenCmsString" /> >>> to >>> <xsd:element name="TextField" type="OpenCmsHtml" /> >>> >>> I believe that will solve your problem. >>> >>> Cheers, >>> Paul >>> >>>> -----Original Message----- >>>> From: opencms-dev-bounces@... >>>> [mailto:opencms-dev-bounces@...] On Behalf Of Eska >>>> Sent: 10. juni 2009 14:10 >>>> To: opencms-dev@... >>>> Subject: [opencms-dev] Probleme when editing an OpenCmsString >>>> with HtmlWidget defined >>>> >>>> >>>> Hi guys, >>>> >>>> I have a little Problem with an OpenCms 7.05 Installation >>>> regarding the >>>> editing of content. >>>> >>>> I have a content-element "TextField" which is an >>>> OpenCmsString, but have >>>> defined to use >>>> the HtmlWidget for editing that "TextField" (see below) >>>> >>>> <xsd:complexType name="OpenCmsHomeSite"> >>>> <xsd:sequence> >>>> <xsd:element name="HeadImage" >>>> type="OpenCmsVfsFile" /> >>>> <xsd:element name="TextField" >>>> type="OpenCmsString" /> >>>> <xsd:element name="Download" >>>> type="OpenCmsDownload" minOccurs="1" >>>> maxOccurs="unbounded" /> >>>> <xsd:element name="Relativetheme" >>>> type="OpenCmsRelativeTheme" >>>> minOccurs="1" maxOccurs="unbounded" /> >>>> <xsd:element name="Contact" >>>> type="OpenCmsContact" minOccurs="0" >>>> maxOccurs="unbounded" /> >>>> </xsd:sequence> >>>> <xsd:attribute name="language" >>>> type="OpenCmsLocale" use="required" /> >>>> </xsd:complexType> >>>> <xsd:annotation> >>>> <xsd:appinfo> >>>> <mappings/> >>>> <layouts> >>>> <layout element="TextField" >>>> widget="HtmlWidget" configuration="source" >>>> /> >>>> </layouts> >>>> <validationrules/> >>>> <defaults/> >>>> </xsd:appinfo> >>>> </xsd:annotation> >>>> >>>> On random Occasions when opening an index.html of that schema not the >>>> HtmlWidget is >>>> used, but the "normal" Html-Input for OpenCmsString elements >>>> is used. In >>>> Addition the HTML-Content >>>> is shown while having been URLEncoded. >>>> >>>> Has anyone expierienced a problem like this or knows how to >>>> avoid such a >>>> thing? >>>> Where in the Source is it determined which HTML to use when >>>> creating the >>>> HTML >>>> for editing the content? >>>> >>>> Thanks in advance! >>>> >>>> Eska >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Probleme-when-editing-an-OpenCmsString-w >>> ith-HtmlWidget-defined-tp23960923p23960923.html >>>> Sent from the OpenCMS - Dev mailing list archive at Nabble.com. >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >> Yeah, I know that could make it easier, but I need an OpenCmsString there >> and the strange thing is, that it happens randomly and if something goes >> wrong, the content is URLEncoded. >> >> It shows e.g. >> >> %3Ch1+style%3D%5C%22margin%3A+20px+0px+0px+25px%3B+font-size%3A+14px%3B%5C%22%3EOnline+Beispiel+der+PHP-Funktion+urldecode%28%29%3C%2Fh1%3E%0D%0A%0D%0A >> >> instead of >> >> <h1 style=\"margin: 20px 0px 0px 25px; font-size: 14px;\">Online Beispiel >> der PHP-Funktion urldecode()</h1> >> >> In the "wrong" Input-Field. >> >> Eska >> > _______________________________________________ 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 |
|||||||||||
|
|
Re: Probleme when editing an OpenCmsString with HtmlWidget definedHi Achim,
as far as I was browsing through the Source of OpenCms 7.0.5 I found, that the Widgets are stored inside a HashMap with the key being the I_CmsXmlContentValue.getName(). I have one "TextField" as an OpenCmsString in example1.xsd (HtmlWidget as layout) and another "TextField" but nested in an example2.xsd. If the m_elementsWidget of the CmsDefaultXmlContentHandler is reused somehow, it might be the case that the DefaultWidget might be returned, since somehow there might be a null value stored for the "TextField" due the returnvalue for a nested context. Could you tell me under which circumstances that caching might invoke the handling I get? When I am changing between editing content of example1.xsd or example2.xsd, the TextField always gets the correct Widget. Thanks Eska
|
|||||||||||
|
|
Re: Probleme when editing an OpenCmsString with HtmlWidget definedHi Achim,
I just had a little time to think, is there a way to force clearing that widget-cache from within the /system/workplace/editors/xmlcontent/editor_form.jsp? Thanks Eska
|
|||||||||||
|
|
Re: Probleme when editing an OpenCmsString with HtmlWidget definedHi Eska,
don't dive too deep, this works for many customers on many installations. Just as I said: If you copy an xsd and use it for a different resource type... change the layouts - section in that file.... but forget to change the outer XML structure naming... those widgets configured in the layouts - section for the same - named nodes are arbitrary. Tweaking the caching is not an option (think of concurrent editors working in OpenCms). Kind Regards, Achim. ------------------- Achim Westermann Alkacon Software GmbH - The OpenCms Experts http://www.alkacon.com - http://www.opencms.org -------- Original-Nachricht -------- > Datum: Tue, 23 Jun 2009 07:15:26 -0700 (PDT) > Von: Eska <sven.kiesow@...> > An: opencms-dev@... > Betreff: Re: [opencms-dev] Probleme when editing an OpenCmsString with HtmlWidget defined > > Hi Achim, > > I just had a little time to think, is there a way to force clearing that > widget-cache > from within the /system/workplace/editors/xmlcontent/editor_form.jsp? > > Thanks > > Eska > > > Achim Westermann wrote: > > > > Hi Eska, > > > > that method returns a different widget for a different value ;-). > > > > But if you are talking about different widgets returned for the same > > value... > > > > It could be that you have copied an XSD from one resource type to create > > another one and forgot to rename all the outer names ending up with same > > - looking XML. There is some caching (for layouts, mappings,...) > > depending on the XML names. > > > > Kind Regards, > > Achim. > > > > ------------------- > > Achim Westermann > > > > Alkacon Software GmbH - The OpenCms Experts > > http://www.alkacon.com - http://www.opencms.org > > > > > > -- > View this message in context: > http://www.nabble.com/Probleme-when-editing-an-OpenCmsString-with-HtmlWidget-defined-tp23960923p24166859.html > Sent from the OpenCMS - Dev mailing list archive at Nabble.com. > > > _______________________________________________ > 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 |
|||||||||||
|
|
Re: Probleme when editing an OpenCmsString with HtmlWidget definedHi Achim, what exactly do you mean by "the outer XML structure naming"? The naming of the xsd:complexType? Just to clarify. The xsd:complexType for all schema-files have to be unique? Thanks Eska
Hi Eska, don't dive too deep, this works for many customers on many installations. Just as I said: If you copy an xsd and use it for a different resource type... change the layouts - section in that file.... but forget to change the outer XML structure naming... those widgets configured in the layouts - section for the same - named nodes are arbitrary. Tweaking the caching is not an option (think of concurrent editors working in OpenCms). Kind Regards, Achim. ------------------- Achim Westermann Alkacon Software GmbH - The OpenCms Experts http://www.alkacon.com - http://www.opencms.org -------- Original-Nachricht -------- > Datum: Tue, 23 Jun 2009 07:15:26 -0700 (PDT) > Von: Eska <sven.kiesow@...> > An: opencms-dev@... > Betreff: Re: [opencms-dev] Probleme when editing an OpenCmsString with HtmlWidget defined > > Hi Achim, > > I just had a little time to think, is there a way to force clearing that > widget-cache > from within the /system/workplace/editors/xmlcontent/editor_form.jsp? > > Thanks > > Eska > > > Achim Westermann wrote: > > > > Hi Eska, > > > > that method returns a different widget for a different value ;-). > > > > But if you are talking about different widgets returned for the same > > value... > > > > It could be that you have copied an XSD from one resource type to create > > another one and forgot to rename all the outer names ending up with same > > - looking XML. There is some caching (for layouts, mappings,...) > > depending on the XML names. > > > > Kind Regards, > > Achim. > > > > ------------------- > > Achim Westermann > > > > Alkacon Software GmbH - The OpenCms Experts > > http://www.alkacon.com - http://www.opencms.org > > > > > > -- > View this message in context: > http://www.nabble.com/Probleme-when-editing-an-OpenCmsString-with-HtmlWidget-defined-tp23960923p24166859.html > Sent from the OpenCMS - Dev mailing list archive at Nabble.com. > > > _______________________________________________ > 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 _______________________________________________ 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 |
|||||||||||
|
|
Re: Probleme when editing an OpenCmsString with HtmlWidget definedHi Sven,
yes, indeed at least the outer complex type has to be unique. Most often my recommendation is to copy the xsd to a text editor and then copy the first outer type without leading "OpenCms" and tailing pluras "s" and replace it with the new name: <xsd:element name="OnlineForms" type="OpenCmsOnlineForms"/> ... --> <xsd:element name="GreenLeaves" type="OpenCmsGreenLeaves"/> ... Kind Regards, Achim. ------------------- Achim Westermann Alkacon Software GmbH - The OpenCms Experts http://www.alkacon.com - http://www.opencms.org -------- Original-Nachricht -------- > Datum: Tue, 23 Jun 2009 16:57:39 +0200 > Von: Sven Kiesow <Sven.Kiesow@...> > An: The OpenCms mailing list <opencms-dev@...> > Betreff: Re: [opencms-dev] Probleme when editing an OpenCmsString with HtmlWidget defined > Hi Achim, > > what exactly do you mean by "the outer XML structure naming"? The naming > of the xsd:complexType? > > Just to clarify. The xsd:complexType for all schema-files have to be > unique? > > Thanks Eska > > > > > "Achim Westermann" <Achim.Westermann@...> > Sent by: opencms-dev-bounces@... > 23.06.2009 16:45 > Please respond to > The OpenCms mailing list <opencms-dev@...> > > > To > The OpenCms mailing list <opencms-dev@...> > cc > > Subject > Re: [opencms-dev] Probleme when editing an OpenCmsString with HtmlWidget > defined > > > > > > > Hi Eska, > > don't dive too deep, this works for many customers on many installations. > Just as I said: If you copy an xsd and use it for a different resource > type... change the layouts - section in that file.... but forget to change > the outer XML structure naming... those widgets configured in the layouts > - section for the same - named nodes are arbitrary. > Tweaking the caching is not an option (think of concurrent editors working > in OpenCms). > > Kind Regards, > Achim. > ------------------- > Achim Westermann > > Alkacon Software GmbH - The OpenCms Experts > http://www.alkacon.com - http://www.opencms.org > > -------- Original-Nachricht -------- > > Datum: Tue, 23 Jun 2009 07:15:26 -0700 (PDT) > > Von: Eska <sven.kiesow@...> > > An: opencms-dev@... > > Betreff: Re: [opencms-dev] Probleme when editing an OpenCmsString with > HtmlWidget defined > > > > > Hi Achim, > > > > I just had a little time to think, is there a way to force clearing that > > widget-cache > > from within the /system/workplace/editors/xmlcontent/editor_form.jsp? > > > > Thanks > > > > Eska > > > > > > Achim Westermann wrote: > > > > > > Hi Eska, > > > > > > that method returns a different widget for a different value ;-). > > > > > > But if you are talking about different widgets returned for the same > > > value... > > > > > > It could be that you have copied an XSD from one resource type to > create > > > another one and forgot to rename all the outer names ending up with > same > > > - looking XML. There is some caching (for layouts, mappings,...) > > > depending on the XML names. > > > > > > Kind Regards, > > > Achim. > > > > > > ------------------- > > > Achim Westermann > > > > > > Alkacon Software GmbH - The OpenCms Experts > > > http://www.alkacon.com - http://www.opencms.org > > > > > > > > > > -- > > View this message in context: > > > http://www.nabble.com/Probleme-when-editing-an-OpenCmsString-with-HtmlWidget-defined-tp23960923p24166859.html > > > Sent from the OpenCMS - Dev mailing list archive at Nabble.com. > > > > > > _______________________________________________ > > 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 > _______________________________________________ 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 |
| Free embeddable forum powered by Nabble | Forum Help |