Image custom field breaking - General Discussions - General Discussions - Progress Community
 General Discussions

Image custom field breaking

  • Image custom field breaking
  • Telerik.Sitefinity.Resources, Version=5.0.2860

    Hi Guys,
    We are shortly to go live with our new website and have encountered a major problem We would be most grateful if anyone is able .The problem arises when we add a custom field of type image to a news widget.  We are following the following procedure:

    1. Add new custom field for News
    2. Set its type to short text
    3. Set "Interface widget for entering data" to Custom
    4. In the custom textbox enter:  Telerik.Sitefinity.Web.UI.Fields.ImageField
    5. The image selector appears in the news publication view as expected and an image can be selected from local machine or image library

    The problem arises if I go back into the image news custom field and edit, I changed the field status to mandatory and saved.  The association with the imagefield is lost. If I create a new news story then the image field just shows as a text field ie an image cannot be selected
  • I still have the same issue even in 6.0 and 6.1

    Is there a stable solution for adding an image field to native modules, News, Blog posts, etc?

    It is just very odd that we can have a Media (images, videos, files) field in dynamic modules and custom content types, but cannot have the same functionality in the native module content-types.
  • Hello Martin,

    The issue heres comes from the fact that dynamic types (module builder items) and content types (blogs, news, products as of 6.0, etc) are different. While dynamic types have support for Guid and Guid[] fields, content types currently do not. We are always looking to improve the product and one of the ways we hope to improve soon is to merge these types so that Guid and Guid[] are available to all types.

    In the meantime you have two options. One is to add a string field and create a field control that uses the string value to store the image url or guid and interpret it back into the actual url or ID when selecting, removing, updating, etc. The other option is to migrate that content to a dynamic module builder based module created in the backend. Easy to do with the point and click creation but you lose some functionality of content types such as granular permissions per object and direct out-of-the-box linking to the alternative publishing methods.

    Patrick Dunn
    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
  • Martin,

    I found a temporary solution as same thing happens to me too.

    To restore image selector UI in the News edit view, go to News settings:

    News > Controls > NewsBackend > Views > NewsBackendEdit > Sections > CustomFieldsSection > Fields

    Find the custom image field you created. I called mine "Image".

    Check out the FieldType value.

    After the field stopped working, I noticed its value changed to 

    Telerik.Sitefinity.Web.UI.Fields.TextField, Telerik.Sitefinity

    Replace it with:

    Telerik.Sitefinity.Web.UI.Fields.ImageField, Telerik.Sitefinity

    and save the settings.

    This should restore the field UI and enable the image selector again.

    I hope this helps.

    BTW, I am not really sure what causes Sitefinity to forget the customization and restore the fieldtype value to the default. Perhaps Telerik Support would shed some light on the topic.

    Osman Gormus