Anders Hattestad
Apr 27, 2011
  4138
(1 votes)

How to use PropertyXhtmlString in a Dynamic Content in CMS 6 R2

I got a problem when I was trying to use the WYSIWYG editor inside the Dynamic Content editor. The problem it seems is that the SavePageHandler in the PageBase on the edit page is not set.

This result in that the check IsNewPage will fail when the editor tries to find the EditorCssPaths.

The quick fix to this is to make your own variant of the PropertyXhtmlString like this

Code Snippet
  1. public class PropertyXhtmlStringV2 : PropertyXhtmlString
  2. {
  3.     public override IPropertyControl CreatePropertyControl()
  4.     {
  5.         return new PropertyXhtmlStringV2Control();
  6.     }
  7. }
  8. public class PropertyXhtmlStringV2Control : PropertyXhtmlStringControl
  9. {
  10.     public override void CreateEditControls()
  11.     {
  12.         (this.Page as PageBase).SavePageHandler = new SaveCurrentPage(this.Page as PageBase);
  13.         base.CreateEditControls();
  14.           
  15.     }
  16. }
Apr 27, 2011

Comments

Erik Nordin Wahlberg
Erik Nordin Wahlberg Apr 27, 2011 09:05 AM

There is a hotfix available from EPiServer as well.

Apr 27, 2011 09:18 AM

Bug #64001: Dynamic Content with public property of type XHTML.

Just for searchability :)

Fredrik Eckmar
Fredrik Eckmar Apr 27, 2011 09:41 AM

I was having this exact problem this morning.. great!

Anders Hattestad
Anders Hattestad Apr 27, 2011 12:09 PM

Is there a list aviable of all the hot fix'es. Are having problem with Property to select a file from a none version filesystem.

Apr 27, 2011 01:19 PM

We have a list of hotfixes that's not up to date :(
http://world.episerver.com/Download/Categories/Download-Type/Hotfixes/

I would suggest to open a ticket with developer support and see if they have one for your issue.

Apr 27, 2011 02:03 PM

Anders - I reported something similar to the non-versioned filesystem bug you mention,

http://world.episerver.com/Support/Bug-List/#bug,EPiServer%20CMS,64398,4b6d%2f5rOFe3dV6T%2boAg7%2bpGT9mk%3d

Its marked as fixed, but I haven't got a hotfix as yet.

smithsson68@gmail.com
smithsson68@gmail.com Apr 27, 2011 02:04 PM

Mark: I take it you've requested a hotfix from Support?

/Paul

Apr 27, 2011 02:13 PM

Side note: Hotfixes do not undergo the same QA process as official releases, consequently there would be a risk involved having them generally distributed. The normal process for us managing a limitation would be to define the problem and root cause and then work around it if possible. The last option would then be to create a fix for the issue (if possible). Directing partners to dev. support also opens up for further traceability which naturally also helps us define and / or out rule certain aspects in future cases.

Andreas Ribbefjord
Andreas Ribbefjord Jan 17, 2012 01:30 PM

We just found out, that in our CMS 6 R2, we had to add a constructor with only a call to base() in order for the snippet above to not throw an exception.

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024

Frontend Hosting for SaaS CMS Solutions

Introduction Now that CMS SaaS Core has gone into general availability, it is a good time to start discussing where to host the head. SaaS Core is...

Minesh Shah (Netcel) | Jul 20, 2024

Optimizely London Dev Meetup 11th July 2024

On 11th July 2024 in London Niteco and Netcel along with Optimizely ran the London Developer meetup. There was an great agenda of talks that we put...

Scott Reed | Jul 19, 2024