Copied to clipboard

Flag this post as spam?

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


  • Jeremy Coulson 43 posts 125 karma points
    Sep 28, 2017 @ 20:28
    Jeremy Coulson
    0

    How can I save without having my data truncated?

    Hello! I added a new property to a document type here today, but I can't seem to save all of my data. I get a 500 error and when I check my log, I see that "string or binary data would be truncated." Okay, maybe something is too long here. Is there another way to approach this? Or can I increase the acceptable size for the data?

    In the example shown below, some code in my view will grab each key and then make some sort of list or array out of the pipe-delimited value. Basically, I have this in some JSON in my view already, but I want to make it super easy for anyone after me to just add or remove data in the back office.

    screen shot

    Thanks for any input!

    Jeremy

  • Anders Bjerner 419 posts 2314 karma points MVP 3x admin c-trib
    Sep 28, 2017 @ 20:50
    Anders Bjerner
    0

    Hi Jeremy,

    What does your package.manifest file look like?

    Most likely you need to set the value type of your editor - eg. like in this example:

    {
        "propertyEditors": [
            {
                "alias": "Skybrud.LinkPicker",
                "name": "Skybrud Link Picker",
                "editor": {
                    "view": "~/App_Plugins/Skybrud.LinkPicker/Views/LinkPicker.html",
                    "hideLabel": false,
                    "valueType": "JSON" 
                }
            }
        ]
    }
    
  • Jeremy Coulson 43 posts 125 karma points
    Sep 28, 2017 @ 21:05
    Jeremy Coulson
    0

    Anders,

    I tried adding JSON like in your example, but I still get the same problem:

    {
    propertyEditors: [
        {
            alias: "Trex.KeyValueList",
            name: "Key/Value List Property Editor",
            icon: "icon-list",
            group: "Rich Content",
    
            editor: {
                view: "~/App_Plugins/KVListPropertyEditor/kvlistpropertyeditor.html",
                "valueType": "JSON"
            },
    

    Do you think I might need to specify something else there? I'm new to this, so I'm not totally sure how to proceed.

    Thanks!

    Jeremy

  • Anders Bjerner 419 posts 2314 karma points MVP 3x admin c-trib
    Sep 28, 2017 @ 21:08
    Anders Bjerner
    0

    I can't remember for sure, but I think Umbraco remembers the old value (which was probably STRING if you hadn't specified anything).

    Does it change anything if you create a new data type and update the property to use that instead?

  • Jeremy Coulson 43 posts 125 karma points
    Sep 29, 2017 @ 12:47
    Jeremy Coulson
    0

    I just realized that I think I can't do this because other pages use this property editor and there might be unforeseen consequences.

    Hmm...

Please Sign in or register to post replies

Write your reply to:

Draft