Comment "reply" not working

Topics: ASP.NET 2.0, Themes
Apr 16, 2011 at 1:56 PM

Im having a problem with the comment replies. When someone leave a reply, it does show normally, but as soon as i hit approve, it just goes back to  the normal comment (ie. the arrow goes away).

 

Anyone know why this happens?

 

Here is my code btw:

 

<%@ Control Language="C#" EnableViewState="False" Inherits="BlogEngine.Core.Web.Controls.CommentViewBase" %>

<link rel="stylesheet" href="style.css" type="text/css" />

<body>
<div id="id_<%=Comment.Id %>" class="comment">
    <div class="topRow"><%= Comment.Website != null ? "<a href=\"" + Comment.Website + "\">" + Comment.Author + "</a>" : Comment.Author %> wrote:</div>
    <div class="clearer"></div>
    <div class="contentRow">
        <div class="commentBox"><%= ResolveLinks(Comment.Content) %></div>
        
        
        <%--<div class="commentBox"><textarea readonly="readonly"><%= ResolveLinks(Comment.Content) %></textarea> </div>--%>
        
        
        <div class="gravatar"><%= Gravatar(80)%></div>
        
    </div>
    <div><div class="flag"><%= Flag %> &nbsp</div><div class="author">| <%= ReplyToLink %> <%= AdminLinks %></div><div class="date"> <%= Comment.DateCreated.ToString("MMMM dd yyyy HH:mm") %></div></div>  
    <div class="clearer"></div>  
</div>

<div class="comment-replies"
     id="replies_<%=Comment.Id %>"
     <%= (Comment.Comments.Count == 0) ? " style=\"display:none;\"" : "" %>>
</div>

    <asp:PlaceHolder ID="phSubComments" runat="server" />
 </body>



Apr 18, 2011 at 8:41 AM

Bump

Apr 18, 2011 at 6:55 PM

In case you didnt understand the explanation in the first post, what i meant is when someone replies to someone else's comment (when you get the comment + the arrow of the left). When i click approve it just turns into a normal comment, ie. the arrow goes away but the blog still sees it as a reply.

 

Thanks

Apr 19, 2011 at 4:25 PM

Bump

Apr 23, 2011 at 11:13 PM

bump

Apr 26, 2011 at 8:30 AM

Bump, does anyone know why  this happens? I cant fix it!

Coordinator
Apr 26, 2011 at 10:06 AM

Does this happen with other themes such as the Standard theme?

Will be good to know if it's a problem with your theme specifically, or any theme.

Apr 26, 2011 at 5:01 PM

Hmm i dont know, i deleted all the themes apart from mine. Maybe there are some parts of my code i can upload and show you?

Coordinator
Apr 27, 2011 at 3:17 AM

You can download BE from the Downloads page, extract the ZIP, take the Standard theme (themes\Standard) and rename the folder to something like "test", and then copy that folder into your /themes folder.  So it'll be themes\test.  You can test temporarily switch to the "test" theme (on the admin Settings page) and view one of the posts where you're seeing this problem with the nested reply arrow not being there ... the purpose here is to see whether the nested comment arrows appear correctly when viewing the same post under the "test" theme.  If it still doesn't appear correctly under the "test" theme, then it's not a theme specific problem and is some problem with the data or BE.  If it does appear correctly under the "test" theme, then that means it's a problem with your theme specifically.

If I were to test this on my end, having your theme folder would be good.  In the meantime, you can do that above test if you're interested in finding out if it's a theme specific problem or a non-theme specific problem.

Apr 29, 2011 at 5:09 PM

It works on the standard theme, want me to upload my theme in a .zip so you can test it?

May 2, 2011 at 6:19 PM

Bump

Coordinator
May 3, 2011 at 10:27 AM

Yes, if you have a place to upload your theme, that would be good.  And then either post a link to the download here, or you can PM me the link.

May 4, 2011 at 9:15 PM

Pmed

Coordinator
May 5, 2011 at 1:24 AM

Thanks.  There was one main problem ... which can also be seen in the CommentView.ascx code you posted in the original post of this thread.  The "phSubComments" placeholder needs to be inside the "comment-replies" DIV (not after it).  I also removed the <body> tags you have in CommentView.ascx since that generates a new set of <body> tags for each comment.  Here's the updated CommentView.ascx file.

<%@ Control Language="C#" EnableViewState="False" Inherits="BlogEngine.Core.Web.Controls.CommentViewBase" %>

<link rel="stylesheet" href="style.css" type="text/css" />


<div id="id_<%=Comment.Id %>" class="comment">
    <div class="topRow"><%= Comment.Website != null ? "<a href=\"" + Comment.Website + "\">" + Comment.Author + "</a>" : Comment.Author %> wrote:</div>
    <div class="clearer"></div>
    <div class="contentRow">
        <div class="commentBox"><%= ResolveLinks(Comment.Content) %></div>
        
        
        <%--<div class="commentBox"><textarea readonly="readonly"><%= ResolveLinks(Comment.Content) %></textarea> </div>--%>
        
        
        <div class="gravatar"><%= Gravatar(80)%></div>
        
    </div>
    <div><div class="flag"><%= Flag %> &nbsp</div><div class="author">| <%= ReplyToLink %> <%= AdminLinks %></div><div class="date"> <%= Comment.DateCreated.ToString("MMMM dd yyyy HH:mm") %></div></div>  
    <div class="clearer"></div>  
</div>

<div class="comment-replies"
     id="replies_<%=Comment.Id %>"
     <%= (Comment.Comments.Count == 0) ? " style=\"display:none;\"" : "" %>>
     <asp:PlaceHolder ID="phSubComments" runat="server" />
</div>

May 7, 2011 at 7:01 PM

Thanks ben! |It works!

 

I have a problem with the scaling now thou...

 

When someone replies, the div that contains the words "commentBox" keeps the same width causing the elements on the right to get pushed down. I tried doing this:

 

.comment-replies .commentBox {width:561px;}

 

But it only works for the first reply.

 

How can i fix this? Maybe make it a % of the full width? Thanks

 

May 7, 2011 at 7:06 PM

Seems to have worked...