More in this section

Forums / Developing with Sitefinity / ShortText is too long. Maximun length is 250 - Custom library provider

ShortText is too long. Maximun length is 250 - Custom library provider

4 posts, 0 answered
  1. Michael
    Michael avatar
    31 posts
    Registered:
    07 Sep 2007
    27 Jan 2010
    Link to this post
    I am receiving this error when I try and save my image after adding some text.

    Value for property ShortText is too long. Maximun length is 250

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Nolics.ORMapper.Base.LengthException: Value for property ShortText is too long. Maximun length is 250

    Source Error:

    Line 46:             File.WriteAllBytes(GetFilePath(contentBase.ID), contentBase.Content as byte[]);
    Line 47:             contentBase.Content = new byte[0];
    Line 48:             base.SaveContent(contentBase as IContent, fireEvents);
    Line 49:         }
    Line 50: 

    Source File: c:\inetpub\public_html\App_Code\LibraryProvider.cs    Line: 48


    I am using a custom library provider as described in this post.
    http://www.sitefinity.com/support/forums/sitefinity-3-x/developing-with-sitefinity/physical-upload-of-files-in-images-and-documents.aspx

    I have added an extra meda data filed so I can give my images some text.  In the web.config file I have set it up to be LongText, but I still get the error.  Is there anyplace else I have to change SortText to LongText?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    27 Jan 2010
    Link to this post
    Hello Michael,

    The error is saying that you are operating with metakey with value ShortText "Value for property ShortText is too long.". You can set all keys from ShortText to LongText or start identifying for which key you use more symbols that the allowed by our data provider.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Michael
    Michael avatar
    31 posts
    Registered:
    07 Sep 2007
    27 Jan 2010
    Link to this post
    Thanks for the information.  I have some follow up questions.

    I changed all my ShortText values to LongText, but I still get the same issue.  Do I also have to change the Integers?
                    <add key="Libraries.Name" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/> 
                    <add key="Libraries.Width" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue=""/> 
                    <add key="Libraries.Height" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue=""/> 
                    <add key="Libraries.Size" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue=""/> 
                    <add key="Libraries.Extension" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/> 
                    <add key="Libraries.AlternateText" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/> 
                    <add key="Libraries.Author" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/> 
                    <add key="Libraries.Description" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/> 
                    <add key="Libraries.Category" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/> 
                    <add key="Libraries.PermaLink" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/> 
                    <add key="Libraries.URL" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/> 
                    <add key="Libraries.Text" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/> 
                    <add key="Libraries.Order" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/> 

    When you say "start identifying for which key you use more symbols that the allowed by our data provider" how would i do that?
  4. Michael
    Michael avatar
    31 posts
    Registered:
    07 Sep 2007
    28 Jan 2010
    Link to this post
    SOLVED!  I found the issue.  I created the library with ShortText and then changed it to LongText.  I deleted and recreated the library and now it works.
Register for webinar
4 posts, 0 answered