Copied to clipboard

Flag this post as spam?

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


  • Pedro Mendes 53 posts 258 karma points
    May 31, 2017 @ 15:15
    Pedro Mendes
    0

    Custom Property Value Truncating on Save

    Hey there,

    I'm having an issue with a custom property I'm creating. Whenever I hit "save & publish", I get the following error: enter image description here

    The data I'm submitting is this:

    {"id":12793,"properties":[{"id":338758,"alias":"title","value":"<p>teste</p>"},{"id":338759,"alias":"formType","value":{"dealerData":[{"b":"Audi","d":[{"id":4176,"n":"Sportagus - Almada"},{"id":4176,"n":"Sportagus - Almada"},{"id":4130,"n":"Sportejo - Santarém"},{"id":4176,"n":"Sportagus - Almada"},{"id":4176,"n":"Sportagus - Almada"},{"id":4130,"n":"Sportejo - Santarém"}]}],"formType":"Campaign"}},{"id":338756,"alias":"to","value":""},{"id":338757,"alias":"cc","value":""},{"id":338755,"alias":"bcc","value":""},{"id":338754,"alias":"backgroundImage","value":""},{"id":338746,"alias":"luFontColor","value":""},{"id":338751,"alias":"luFontColorSpecial","value":""},{"id":338745,"alias":"luBackgroundColor","value":""},{"id":338750,"alias":"luFontColorInsideProp","value":""},{"id":338748,"alias":"luButtonBackgroundColor","value":""},{"id":338749,"alias":"luButtonHoverColor","value":""},{"id":338747,"alias":"luButtonTextColor","value":""},{"id":338752,"alias":"marginTop","value":""},{"id":338753,"alias":"marginBottom","value":""}],"name":"teste","contentTypeAlias":"closeUpForm","parentId":9001,"action":"publish","expireDate":null,"releaseDate":null,"templateAlias":""}
    

    The data from the custom controller is this:

    {"dealerData":[{"b":"Audi","d":[{"id":4176,"n":"Sportagus - Almada"},{"id":4176,"n":"Sportagus - Almada"},{"id":4130,"n":"Sportejo - Santarém"},{"id":4176,"n":"Sportagus - Almada"},{"id":4176,"n":"Sportagus - Almada"},{"id":4130,"n":"Sportejo - Santarém"}]}],"formType":"Campaign"}
    

    In my package.manifest, I tried setting valueType:to "JSON" and "TEXT" but it did nothing...

    Has anyone ever walked into something like this or similar? I'm kinda lost here.. :\

    Thanks, Pedro

    edit: added the data relative to the custom controller

  • Pedro Mendes 53 posts 258 karma points
    May 31, 2017 @ 20:52
    Pedro Mendes
    100

    Weeeeeellll...

    Apparently your modifications in the package.manifest work with a simple restart in the app pool, unless you try to change the valueType... The valueType remains the same even if you change it.. I'm working on Umbraco v7.3 and I can't be sure this is fixed in the following versions.

    Anyhow, a "simple" fix is to manually update your cmsDataType table's dbType column from your old value to the new one (I updated from Nvarchar to Ntext).

  • ThomasHerckenrath 5 posts 25 karma points
    Jan 14, 2021 @ 10:55
    ThomasHerckenrath
    0

    This was working for me, but unfortunatly it did not work in all cases. In my case I have a label on a page, filled with links to pages where the item is linked to. Before applying your provided fix, I was able to have +/- 10 links in the list before it was truncated. I changed nvarchar to ntext in the CmsDataType table, and it started working again. Now I'm getting the same error, but for +/- 20 links. Am I hitting the limits? I would expect ntext to be big enough to store about 1000 characters, so what am I doing wrong?

    note: I am using Umbraco 8.3, the problem still persists here.

  • 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