ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Comment problem

February 09, 2011 4:12am

Subscribe [3]
  • #1 / Feb 09, 2011 4:12am

    coolstuffchannel

    114 posts

    I am usingpaginate with multifield:

    {multi_field="extended|page2|page3|page4|page5|page6|page7|page8|page9|page10"}

    I have comments as part of the template code and they ultimately show at the bottom of each page.  However, per article, for some reason, comments get reduced by 1 on every page.

    For example, if there were 10 comments on the first page, of a 4 page post, page two will only display 9, page 3 will only display 8 comments, etc.

    This becomes an issues when/if comments disappear that ultimately referred to pages.

    Any suggestions?

  • #2 / Feb 09, 2011 4:10pm

    Ingmar

    29245 posts

    What version and build of EE are you using? Do you’ve got a link to the site?

  • #3 / Feb 09, 2011 4:24pm

    coolstuffchannel

    114 posts

    I am using 1.69.  I’ve paid for the upgrade to 2, but to be honest, there is so much that we’ve adjusted on the site, I’m nervous to upgrade…

    Anyway, here’s a link where you can see the problem:
    http://provideocoalition.com/index.php/awilt/story/overview_several_first-generation_versacams/

    If you go to the second page of the article, you’ll notice the first comment from Nomad is thus removed from the list…

  • #4 / Feb 10, 2011 5:57am

    John Henry Donovan

    12339 posts

    coolstuffchannel,

    Can you share your relevant template code please?
    Are you using any extensions?

  • #5 / Feb 11, 2011 8:48pm

    coolstuffchannel

    114 posts

    Here’s the code:  You’ll notice Tags extension.

    We also use:
    Friends (only recently installed and the problem existed prior)
    constantcontact
    Clone entries
    sitemap pinger
    User (only recently installed and the problem existed prior)
    comment spam and parse rating

    {exp:weblog:entries weblog="{my_weblog}" paginate_type="field" paginate="both"}
    
    <div class="author">{entry_date format=' %l, %F %d, %Y '}</div>
    Filed under: {categories}<a href="http://{path={my_weblog}/index}">{category_name}</a> •{/categories}
                                <h2>{title}</h2>
    
    <p>                            <div class="author"><em>{author} | {entry_date format='%m/%d'}</em></div><br />
    <strong>{subtitle}</strong></p>
    
    <p>                            <br />
    {if segment_4 == "" OR segment_4 == 'P0'}<br />
    {image}<br />
    {body}</p>
    
    <p>{/if}</p>
    
    <p>{exp:legacy_typography}</p>
    
    <p><br />
    {multi_field="extended|page2|page3|page4|page5|page6|page7|page8|page9|page10"}</p>
    
    <p><br />
    {/exp:legacy_typography}<br />
                                    {if video != ""}<a href="http://{path={my_weblog}/video/{url_title}}" class="more-link"><strong>Click to play audio / video </strong>»</a>{/if}</p>
    
    <p>{paginate}<br />
    <strong>(Page {current_page} of {total_pages} pages for this article {pagination_links})</strong><br />
    {/paginate}</p>
    
    <p><br />
     <div class="clearboth"></div></p>
    
    <p>{/exp:weblog:entries}<br />
                <br />
     <div align="right"><a href="http://provideocoalition.com/index.php/sgentry">Back to Production Gear »</a>   </div></p>
    
    <p> <a href="http://provideocoalition.com/images/comments2.gif">http://provideocoalition.com/images/comments2.gif</a><br />
     {embed="commentnotice/index"}</p><blockquote><p>{exp:comment:entries weblog="{my_weblog}" limit="50"}</p>
    
    <p>{comment}</p>
    
    <p>Posted by {url_or_email_as_author}   on  {comment_date format='%m/%d'}  at  {comment_date format='%h:%i %A'}<hr></p>
    
    <p>{/exp:comment:entries}</p>
    
    <p>{exp:comment:form preview="{my_template_group}/comment_preview"}</p>
    
    <p>{if logged_out}</p>
    
    <p>Name:</p>
    
    <p><input type="text" name="name" value="{name}" size="50" /></p>
    
    <p><br />
    Email:</p>
    
    <p><input type="text" name="email" value="{email}" size="50" /></p>
    
    <p><br />
    Location:</p>
    
    <p><input type="text" name="location" value="{location}" size="50" /></p>
    
    <p><br />
    URL:</p>
    
    <p><input type="text" name="url" value="{url}" size="50" /></p>
    
    <p><br />
    {/if}</p>
    
    
    
    <p> </p>
    
    <p><textarea name="comment" cols="50" rows="12">{comment}</textarea></p>
    
    <p><br />
    <a >Smileys</a></p>
    
    <p> </p>
    
    <p> </p>
    
    <p>{if logged_out}<br />
    <input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information<br />
    {/if}</p>
    
    <p><input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?</p>
    
    <p>{if captcha}<br />
    Submit the word you see below:</p>
    
    <p>{captcha}</p>
    
    <p><br />
    <input type="text" name="captcha" value="" size="20" maxlength="20" style="width:140px;" /></p>
    
    <p>{/if}</p>
    
    <p><input type="submit" name="submit" value="Submit" /></p>
    
    <p><br />
    {/exp:comment:form}</p>
    
    <p> </p>
    </blockquote><p>

  • #6 / Feb 12, 2011 4:48pm

    Greg Salt

    3988 posts

    Hi coolstuffchannel,

    Can you please try adding these parameters to your comment:entries tag:

    dynamic="off" url_title="{segment_3}"

    Does that resolve the issue?

    Cheers

    Greg

  • #7 / Feb 12, 2011 5:27pm

    coolstuffchannel

    114 posts

    That looks like it may have worked.  It reversed the comment order so that the most recent is on the top.  Is there a way to have the newest on the bottom?

    Thanks for your help.  This has been driving us crazy.

    Also, what is the reasoning behind Dynamic off (perhaps that’s the order) and what is Segment_3?  I’d like to understand the changes for future use.

    Thanks again.

  • #8 / Feb 13, 2011 4:06pm

    Greg Salt

    3988 posts

    Hi coolstuffchannel,

    The comment entries tag has a sort parameter that you can use. The dynamic parameter switches off the default behaviour of EE tags in that they respond to what is in the URL and change their output accordingly. Segments are variables that EE creates. Any URL is split into its constituent parts defined by a slash and assigned a number. Therefore, this:

    <a href="http://domain.com/blog/my_entry_title">http://domain.com/blog/my_entry_title</a>

    has two segments (in EE terminology) and they can be referenced anywhere in a template. These segments would be:

    {segment_1} = blog
    {segment_2} = my_entry_title

    So, segment_3 in the URL you provided is ‘overview_several_first-generation_versacams’ and this corresponds to your article url_title.

    I’m glad that you got this working but please do upgrade to version 1.7.0 as soon as it is practicable and then test this again.

    Cheers

    Greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases