Module

Developer
Supported

Threaded Comments

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Yuri Salimovskiy

     

You must be logged in to post.

Threaded Comments working for one channel but not another

Support Request

therooster
therooster

I have 2 channels setup the same exact way. using the same template for both channels, one channel entry’s comments are displaying, but another one is not.

I’m using the sample code in your documentation: see below.

For kicks, I tried out EE standard comment code. And all works.

any ideas?

EE standard code:

{exp:comment:entries sort="asc" limit="20"}
        {comment}
        
<p>By {name} on {comment_date format="%Y %m %d"}</p>
{/exp:comment:entries} 

Threaded comments code

{!-- do not forget to include jQuery library --}
[removed][removed]

{exp
:threaded_comments:display}
<ul>
{comments}
{thread_start}
<ul>
{/thread_start}
<li>
<
div class="comment-text">{comment}</div>
    
<
p>{url_as_author} --- <a href="[removed]void(0)" class="reply" rel="{comment_id}">Reply to this comment</a> <a href="[removed]void(0)" class="quote reply" rel="{comment_id}">Quote and reply</a> </p>
   

  
</
li>
{thread_end}
</ul>
{/thread_end}
{
/comments}
</ul>
{/exp:threaded_comments:display}

<p><a href="[removed]void(0)" class="reply" rel="0">Reply to entry</a></p

{exp:threaded_comments:form}
{if logged_out}
<p> <input type="text" name="name" value="Name" /> </p>
<
p> <input type="text" name="email" value="Email" /> </p>
{/if}

<p>
<
textarea name="comment" id="comment-comment" cols="22" rows="5" tabindex="4">Message</textarea>
</
p>

<
p><input type="submit" name="submit" value="submit" /></p>
{/exp:threaded_comments:form} 

{
!-- this code will set proper parent_id and move the form --}
<style type="text/css">
#comment_form {display: none;}
</style>
[removed]
$(document).ready(function(){
  
$('.reply').click(function() {
    
$('#comment_form input[name=parent_id]').val($(this).attr('rel'));
    $(
'#comment_form').insertAfter// Insert the comment form after...
    
$(this)
    .
parent() // The containing p tag
    
);
    $(
'#comment_form').show();
  
});
  $(
'.quote').click(function() {
    
$('#comment_form textarea[name=comment]').val('[quote]'
    $(
this).parent().parent().find('.comment-text').text()+
    
'[/quote]'
    
);
  
});
});
[removed] 
Yuri Salimovskiy
# 1
Developer
Yuri Salimovskiy

Well, if one work and the other does not then they are not the same.
Perhaps the URL structure is different? Could it be related to tags nesting? Channel preferences?

therooster
# 2
therooster

I checked all of that previously.

The url structure is the same since both channels are sharing/using the same template.
The preferences are the same for both channels.
Not certain how nested tags would come into play. Below is my channel entry code.

{exp:channel:entries channel="blog|product_profiles" limit="1"}
    {title}


    {if comment_total 
== "0"}
   
<p> <i>Be the first person to leave a comment</i><
    
{if:else}

    
<h3>{comment_total} Comments</h3>


    
{/if}     
    
    {
/exp:channel:entries} 

 

Why would the native functionality be working/displaying for both, but not Threaded Comments?

Yuri Salimovskiy
# 3
Developer
Yuri Salimovskiy

If you provide me with admin access to your site, I’d be happy to look. support@intoeetive.com

loemrntdherid1
# 4
loemrntdherid1