Blog Comment Control Not Working
On my current Sitefinity instance, I've set up a blog, created a template for the layout, and set a blog posts widget on the page. Additionally, I've modified the template of the blog posts widget a bit. It all displays fine when I go to the page with the blog posts listing. However, when I go to an individual blog post page, the comments rich text area is not functioning correctly. It often does not show the white background, allow users to enter input, and the formatting bar does not displaying correctly. Here's the template I'm using:
<%@ Control Language="C#" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Comments" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Import Namespace="Telerik.Sitefinity" %>
<
telerik:RadListView
ID
=
"Repeater"
ItemPlaceholderID
=
"ItemsContainer"
runat
=
"server"
EnableEmbeddedSkins
=
"false"
EnableEmbeddedBaseStylesheet
=
"false"
>
<
LayoutTemplate
>
<
sf:ContentBrowseAndEditToolbar
ID
=
"MainBrowseAndEditToolbar"
runat
=
"server"
Mode
=
"Add"
></
sf:ContentBrowseAndEditToolbar
>
<
ul
class
=
"sfpostsList sfpostListTitleDateSummary"
>
<
asp:PlaceHolder
ID
=
"ItemsContainer"
runat
=
"server"
/>
</
ul
>
</
LayoutTemplate
>
<
ItemTemplate
>
<
li
class
=
"sfpostListItem"
>
<
h2
class
=
"sfpostTitle"
>
<
sf:DetailsViewHyperLink
TextDataField
=
"Title"
ToolTipDataField
=
"Description"
runat
=
"server"
/>
</
h2
>
<
div
class
=
"sfpostAuthorAndDate"
>
<
asp:Literal
ID
=
"Literal2"
Text="<%$ Resources:Labels, By %>" runat="server" />
<
sf:PersonProfileView
runat
=
"server"
/>
<
sf:FieldListView
ID
=
"PostDate"
runat
=
"server"
Format
=
" | PublicationDate.ToLocal():MMM dd, yyyy"
/>
</
div
>
<
sf:FieldListView
ID
=
"PostContent"
runat
=
"server"
Text
=
"0"
Properties
=
"Summary"
WrapperTagName
=
"div"
WrapperTagCssClass
=
"sfpostSummary"
/>
<
sf:DetailsViewHyperLink
ID
=
"FullStory"
Text
=
"KEEP READING"
runat
=
"server"
CssClass
=
"button"
/>
<
div
>
Posted in <
sitefinity:FlatTaxonField
ID
=
"FlatFieldControl"
DisplayMode
=
"Read"
runat
=
"server"
WebServiceUrl
=
"~/Sitefinity/Services/Taxonomies/FlatTaxon.svc"
AllowMultipleSelection
=
"true"
TaxonomyId
=
"CB0F3A19-A211-48a7-88EC-77495C0F5374"
TaxonomyMetafieldName
=
"Tags"
Expanded
=
"false"
ExpandText
=
"ClickToAddTags"
BindOnServer
=
"true"
style
=
'display: inline;'
/>
</
div
>
<
sf:ContentBrowseAndEditToolbar
ID
=
"BrowseAndEditToolbar"
runat
=
"server"
Mode
=
"Edit,Delete,Unpublish"
></
sf:ContentBrowseAndEditToolbar
>
</
li
>
</
ItemTemplate
>
</
telerik:RadListView
>
<
sf:Pager
id
=
"pager"
runat
=
"server"
></
sf:Pager
>
It may also be worth noting, I'm getting the following JavaScript errors:
Hello Brett,
Do you use some custom scripts on the page or have you changed the initial version of jQuery. From the error it looks like that there is some js conflict and some of the objects could not be found.
You can see if there are custom scripts loaded using FireBug or another tool like fiddler web debugger.
Best wishes,
Ivan Dimitrov
the Telerik team
Ivan,
Yes I am using custom scripts on the page. I'm importing jQuery using the following method:
<
sf:ResourceLinks
ID
=
"resourcesLinks"
runat
=
"server"
>
<
sf:ResourceFile
JavaScriptLibrary
=
"JQuery"
/>
</
sf:ResourceLinks
>
<
script
src
=
"/js/jquery.tools.min.js"
type
=
"text/javascript"
></
script
>
<
script
src
=
"/js/global.js"
type
=
"text/javascript"
></
script
>
<
script
type
=
"text/javascript"
>
jQuery(document).ready(function ()
jQuery(".sfTagsList").each(function (index, item) $(item).find("li:last-child").addClass('last'); )
);
</
script
>
Hello Brett,
I suppose that the problem is related to
<
script
src
=
"/js/jquery.tools.min.js"
type
=
"text/javascript"
></
script
>
<
script
src
=
"/js/global.js"
type
=
"text/javascript"
></
script
>
Innovation is an evolutionary process. It takes time, profound body of knowledge and continuous passionate efforts to build technology and process breakthroughs. Regards - http://ecommercemix.com