+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Limited amount of text (characters) in Sitefinity news module

Limited amount of text (characters) in Sitefinity news module

20 posts, 0 answered
  1. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    02 Jun 2011
    Link to this post
    Hi Guys,

    Our client is trying to add a lot of text to a news article but when she saves the article, the article is cut off. Is there a known limitation to how many words can be added to the text module in Sitefinity or is this a bug?

    Thanks,
    James
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    02 Jun 2011
    Link to this post
    Hi James@Nw,

    We use NVARCHAR(MAX) data type to store the content.  The content could be stripped in cases when some RadEditor properties are set

    Note: the above applies to the content of the item. There are some limitation for the other metafields like title and summary.

    All the best,
    Ivan Dimitrov
    the Telerik team
    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
  3. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    03 Jun 2011
    Link to this post
    Hi Ivan..

    Can you please tell me where I need to make this change to allow for me text?

    <telerik:RadEditor runat="server" MaxTextLength="150" ID="RadEditor1">
        <Modules>
            <telerik:EditorModule Name="RadEditorStatistics" Visible="true" />
        </Modules>
    </telerik:RadEditor>

    I will search through the folders and see if I can find this but I am also concerned about what else this may affect in the long run, or is this something I should not worry about?

    Thanks,
    James
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    03 Jun 2011
    Link to this post
    Hi James@Nw,

    We don't set limitation of the content. It is set somewhere in an external template you mapped or the content gets stripped when it goes to the database.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    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
  5. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    03 Jun 2011
    Link to this post
    Hi Ivan,

    Thanks again for getting back to me so quickly!

    I have opened up Notepad++ and run through all of the files searching for MaxTextLength and these are the results. As you can see there is no reference to mapped controls.

    Search "MaxTextLength" (10 hits in 2 files)
      C:\inetpub\wwwroot\Sitefinity\3.7\SP4\Client-V1\Client.Web.Ui\bin\Telerik.Web.UI.dll (9 hits)
    Line 117513: }if(!this.validateMaxTextLength()){this.displayMaxTextLengthErrorMessage();
    Line 117513: }if(!this.validateMaxTextLength()){this.displayMaxTextLengthErrorMessage();
    Line 118001: },validateMaxTextLength:function(g){var h=this.get_maxTextLength();
    Line 118017: },displayMaxTextLengthErrorMessage:function(){alert(this.get_localization()["exceededtextlength"]+" "+this.get_maxTextLength()+". "+this.get_localization()["reducetheconentlength"]+".");
    Line 118091: }else{if(!this.validateMaxTextLength()){c=2;
    Line 118094: }else{if(c==2){this.displayMaxTextLengthErrorMessage();
    Line 362248: Ž
    Line 362248: Ž
    Line 362248: Ž
      C:\inetpub\wwwroot\Sitefinity\3.7\SP4\Client-V1\Client.Web.Ui\bin\Telerik.Web.UI.xml (1 hits)
    Line 36977:         <member name="P:Telerik.Web.UI.RadEditor.MaxTextLength">
    ------------------------------------------------------------------------------------------------------------------------
    In the last file, "Telerik.Web.UI.xml" I found this reference:

    <member name="P:Telerik.Web.UI.RadEditor.MaxTextLength">
                <summary>
                Gets or sets the max length (in symbols) of the text inserted in the RadEditor. When the value is 0 the property is disabled.
                </summary>
            </member>
            <member name="P:Telerik.Web.UI.RadEditor.MaxHtmlLength">
                <summary>
                Gets or sets the max length (in symbols) of the HTML inserted in the RadEditor. When the value is 0 the property is disabled.
                </summary>
            </member>


    Before I start delving into the content being stripped when it goes to the database, I wanted to find out from you if there is a property I can add or change i.e. MaxTextLength="150" in the  Telerik.Web.UI.xml file?

    Thanks again,
    James
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    03 Jun 2011
    Link to this post
    Hi James@Nw,

    You can map external templates  for the view you want to modify and there set the property of the RadEditor control. You cannot change this in the xml of an assembly which provides only description.

    Regards,
    Ivan Dimitrov
    the Telerik team
    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
  7. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    03 Jun 2011
    Link to this post
    Hi Ivan,

    Ok let me try the mapped template option and see how that goes.


    Cheers,
    James
  8. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    03 Jun 2011
    Link to this post
    Hi Ivan,

    Of these templates to map, which one do I choose to sort MaxTextLength...

    <!--Provides user interface for displaying a list of all the news items in the News module.-->
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemsList" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/NewsItemsList.ascx" />
        <!--Provides user interface for previewing a news item in the News module.-->
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemPreview" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/NewsItemPreview.ascx" />
        <!--Provides user interface for editing a news item in the News module.-->
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemEdit" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/NewsItemEdit.ascx" />
        <!--Provides user interface for adding new news items in the News module.-->
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemNew" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/NewsItemNew.ascx" />
        <!--Provides user interface for managing the history of news item versions in the News module.-->
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemHistory" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/NewsItemHistory.ascx" />
        <!--Provides user interface for managing categories in the News module.-->
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsCategoriesView" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/CategoriesView.ascx" />
        <!--Provides user interface for managing tags in the News module.-->
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsTagsView" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/TagsView.ascx" />
        <!--Provides user interface for displaying a list of comments in the News module.-->
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsCommentsList" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/CommentsList.ascx" />
        <!--Provides user interface for editing a comment in the News module.-->
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsCommentsEdit" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/CommentsEdit.ascx" />
        <!--Provides user interface for previewing a comment in the News module.-->
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsCommentsPreview" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/CommentsPreview.ascx" />
        <!--Provides user interface for managing permissions in the News module.-->
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsPermissionsView" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/PermissionsView.ascx" />

    I have mapped this one to my MappedControls folder but I do not see the option to change MaxTextLength.

    <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemPreview" layoutTemplatePath="~/Sitefinity/MappedTemplates/News/NewsItemPreview.ascx" />

    I have done a search on all the templates and not found any reference to MaxTextLength either.

    Thanks,
    James
  9. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    06 Jun 2011
    Link to this post
    Hi Ivan,

    Could you please have a look at the above and let me know which mapped template I should be using?

    Many thanks,
    James
  10. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    07 Jun 2011
    Link to this post
    Hi Guys,

    Can someone maybe get back to me on this one?

    Many thanks,
    James
  11. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    07 Jun 2011
    Link to this post
    Hi Ivan,

    When I map this control, I get the following error:

    "The control must be assignable form type "System.Web.UI.WebControls.Repeater" and must have ID "repeater"."

    All of our other mapped controls come from the same version of the templates, so I doubt that it is this but just so you know, I run the following version of Sitefinity: 3.7.2136.2:1

    Thanks,
    James
  12. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    07 Jun 2011
    Link to this post
    Hello James@Nw,

    System.Web.UI.WebControls.Repeater controls are used for the public generic content based controls which does not have RadEditor declaration in them. Which is the exact view you want to modify and test with?

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    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
  13. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    07 Jun 2011
    Link to this post
    Hi Ivan,

    I need to know a few things:

    1. Which template do I need to map in order to make the MaxTextLength change to RadEditor for the News module?

    <!--Provides user interface for editing a news item in the News module.-->
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemEdit" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/NewsItemEdit.ascx" />

    2. Once this is done, I need to know where in the News Control settings I need to add this template? I don't think this is in the SingleItemTemplatePath or ItemListTemplatePath? (see the attached image)

    Thanks

  14. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    07 Jun 2011
    Link to this post
    Hi Ivan,

    Any response on this?

    Thanks,
    James
  15. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    08 Jun 2011
    Link to this post
    Is there someone else that can help on this one please?

    Thanks
  16. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    08 Jun 2011
    Link to this post
    Hi Guys,

    I seriously need to know which control I need to map to get this working please?

    Thanks,
    James
  17. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    09 Jun 2011
    Link to this post
    Hi Guys,

    Is there someone else who can help with this?

    Thanks,
    James
  18. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    09 Jun 2011
    Link to this post
    Hi James@Nw,

    NewsItemEdit is the backend template that is used when you try to edit an existing news item. The template that is used for inserting items is called NewsItemNew. Both the templates have RadEditor control in them.

    The public control - NewsView does not uses RadEditor. It uses a Repeter. The Repeater has ItemTemplate. Inside the ItemTemplate there are controls. The control has two modes

    1. List mode. Here we show only the summary

    <asp:Literal ID="Summary" runat="server" Text=""></asp:Literal>

    2. Details mode. Here we show the content

    <asp:Literal ID="content" runat="server"></asp:Literal>

    We use the ASP.NET literal control.

    The NewsView allows you to show limited number of the summary or content by using its designer settings. Please check attached screenshot.

    By default we do not set limitation to the symbols when you enter or edit content item using the RadEditor control and working directly with News module.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    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
  19. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    10 Jun 2011
    Link to this post
    Thanks Ivan,
    I am going to try this now and will get back to you if I get it working or not.
  20. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    10 Jun 2011
    Link to this post
    Hi Ivan,

    If I understood you correctly, I had to map the two controls; NewsItemEdit and NewsItemNew?

    I mapped the first control, NewsItemNew, added the 
    MaxTextLength="150" to the  RadEditor properties and then ran a test whereby I added a very long article of 5400 characters. When I saved that article, a Javascript popup window came up warning me that my text is longer than 150 characters and that I should fix this. The article saved but it saved all the text anyway. When I checked this on the live site, the entire articles shows instead of just the 150 characters.

    For now, this is working and that's all that matters to me, but I thought I would let you know...or maybe you can let me know if there is something else I need to do? I set that max characters to 10000 which should not cut any article off in the future, I hope.

    Cheers,
    James


Register for webinar
20 posts, 0 answered