Custom Content Module Won't Update

Posted by Community Admin on 04-Aug-2018 18:06

Custom Content Module Won't Update

All Replies

Posted by Community Admin on 07-Jun-2011 00:00

I've implemented a custom content module and am able to create a new item just fine.  However, when I go back to make changes to that item and re-publish, none of the changes are picked up.  This module is based off of the jobs module example for what it's worth.  I can post any code needed for review, but am not sure what code would be relevant.  It seems like there data provider to do be doing this.

Posted by Community Admin on 13-Jun-2011 00:00

Hello Brett,

I replied to your support ticket with details about the fix. For the sake of common knowledge, I'll post it here as well.

If your module is based on Content and has problems updating items (saving them for a second time after they are created), the most probable reason is incorrect binding of Lstring properties in your module definitions. If you have a line like the following:

DataFieldName = "Content",

and here Content is a property of your data model of type Lstring, then you should substitute it with this:
DataFieldName = displayMode == FieldDisplayMode.Write ? "Content.PersistedValue" : "Content",

This should fix the problem. For the latest fixes and approaches on building modules, you can always refer to the sample modules in the Sitefinity SDK. Do not assume they stay the same. We change them with fixes and updates after each release.

All the best,
Slavo
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed