Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Angus 7 posts 77 karma points
    Apr 06, 2016 @ 13:32
    Angus
    1

    (Vorto+RTE) -> Empty RTE -> log errors

    [ EDIT : Fixed at v1.5.2 ]

    (Umbraco 7.3.4 / Vorto 1.5.1)

    Created a datatype based on a Vorto wrapped RTE. Properties based on this datatype appear slow to load - the 'Loading...' text takes some time to clear - and if the RTE is left empty the log files show conversion errors during the loading and saving of documents, e.g.,

    2016-04-06 08:35:11,205 [P5500/D2/T14] ERROR Our.Umbraco.Vorto.Web.PropertyEditors.VortoPropertyEditor+VortoPropertyValueEditor 
     - Error converting DB value to String
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Our.Umbraco.Vorto.Web.PropertyEditors.VortoPropertyEditor.VortoPropertyValueEditor.
       ConvertDbToString(Property property, PropertyType propertyType, IDataTypeService dataTypeService)
    2016-04-06 08:35:11,252 [P5500/D2/T14] ERROR Our.Umbraco.Vorto.Web.PropertyEditors.VortoPropertyEditor+VortoPropertyValueEditor 
     - Error converting DB value to Editor
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Our.Umbraco.Vorto.Web.PropertyEditors.VortoPropertyEditor.VortoPropertyValueEditor.
       ConvertDbToEditor(Property property, PropertyType propertyType, IDataTypeService dataTypeService)
    

    The xml corresponding to the empty property is stored in the db as:

    <bodyTextVorto><![CDATA[{
      "dtdGuid": "1510ee86-759d-4645-ae0e-c4f62d2d4f24"
    }]]></bodyTextVorto>
    

    Once content is added to the RTE the errors clear, reappearing if the content is removed.

    [Quick fix: for the moment, altered VortoPropertyEditor.cs to return empty string if the deserialized value.Values is null]

    Great package by the way.

    Angus

  • Rihab 104 posts 388 karma points
    Sep 13, 2018 @ 11:26
    Rihab
    0

    Hi Angus,

    Can you help me with how to show the vorto RTE Data i'v tried @Umbraco.Field("The RTE name") and @Model.Content.GetVortoValue("The RTE name") and i can't find the right way.

    thanks in advance.

  • Angus 34 posts 128 karma points
    Sep 14, 2018 @ 15:07
    Angus
    0

    Hi,

    Try...

    @Html.Raw(Model.Content.GetVortoValue<string>("vortoRTE"))
    

    ... where "vortoRTE" is the name of the Vorto property wrapping the RTE data type.

    A.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies