I've been using Channel Ratings for a few years now all with no issues. However I've noticed since upgrading EE to 2.9 that only the first comments on any one entry appears (on some entries there are 10's of comments with ratings).
I have also just upgraded Channel Ratings to 4.0.8 from 4.0.3.
Reviewing the update notes on both EE and Channel ratings I don thik there aren't any template changes (are there) that I should be aware of so I can't work out why this would be happening.
Any pointers much appreciated.
My code as follows:
<?php $commentCount = 0; ?>
{exp:comment:entries sort="asc" entry_id="{entry_id}" limit="10"}
<?php $commentCount++; ?>
<article class="review">
<div class="review-meta">
{exp:channel_ratings:rating_comment comment_id="{comment_id}"}
<div class="rating rated-2">{rating:overall:stars}</div>
{/exp:channel_ratings:rating_comment}
<p>{name}</p>
<time datetime="">{comment_date format="%d/%m/%Y"}</time>
</div>
<div class="review-content">
<p>{comment}</p>
</div><!-- .review-content -->
<div class="feedback">
{exp:channel_ratings:likes comment_id="{comment_id}"}
{if rating:not_voted}
{exp:channel_ratings:new_like comment_id="{comment_id}" allow_guests="yes"}
<div class="useful">
<p class="label">Was this comment useful to you?</p>
<p><a href="{rating:like_url}">Yes</a> <a href="{rating:dislike_url}">No</a></p>
</div>
{/exp:channel_ratings:new_like}
{/if}
{if rating:liked OR rating:disliked}
<p class="abuse">{if rating:liked}{rating:liked} {if rating:liked == 1}person{if:else}people{/if} found this useful <br />{/if}{if rating:disliked}{rating:disliked} {if rating:disliked == 1}person{if:else}people{/if} did not find this useful{/if}</p>
{/if}
{/exp:channel_ratings:likes}
<!--<p class="abuse"><a href="#">Report abuse</a></p>-->
</div>
</article>
{/exp:comment:entries}
<?php
if($commentCount < 1)
{
?><article class="review">
<div class="review-meta"></div>
<div class="review-content">
<p>Be the first to write a review!</p>
</div><!-- .review-content -->
<div class="feedback"></div>
</article><?php
}
?>
{exp:comment:form channel="channel_name_here" entry_id="{entry_id}" rating:enabled="yes" rating:allow_guests="yes" }
<div id="review-form" class="review-form">
{if rating:already_rated}
<h3 class="title-style">You have already <strong>reviewed this entry</strong></h3>
{if:else}
<h3 class="title-style">Write <strong>a Review</strong></h3>
{if logged_out}
<div class="form-field">
<label for="name">Name</label>
<input type="text" name="name" id="name" value="{name}" size="50" />
</div>
<div class="form-field">
<label for="email">Email</label>
<input type="text" name="email" id="email" value="{logged_in_email}" size="50" />
</div>
{/if}
<div class="form-field">
<label for="email">Review</label>
<textarea name="comment" cols="70" rows="10">{comment}</textarea>
</div>
{if rating:not_rated}
<div class="form-field">
<label for="rating">Rating</label>
<select name="rating[default]" id="review">
<option value="5">5</option>
<option value="4">4</option>
<option value="3">3</option>
<option value="2">2</option>
<option value="1">1</option>
</select>
</div>
{/if}
<div class="form-field submit">
<input type="submit" class="form-button">
</div>
{/if}
</div>
{/exp:comment:form}
** UPDATE **
Since posting this another issue with the comments / ratings has popped up. On some of my pages with lots of comments & ratings (30+) I've been reaching the memory limit for the mysql_result.php script. Whilst I realise this might be a clue that I should paginate my comments, this issue didn't appear until I upgraded.
** UPDATE 2 **
Even using the most basic comment code results in only the first comment appearing:
{exp:comment:entries sort="asc" limit="20" entry_id="{entry_id}"}
{comment}
<p>By {name} on {comment_date format="%Y %m %d"}</p>{/exp:comment:entries}