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.

Weblog with pagination is loading all entries in IE instead of just that pages entries

January 18, 2008 1:11pm

Subscribe [1]
  • #1 / Jan 18, 2008 1:11pm

    mcneasep

    21 posts

    That basically sums it up.  I have a blog that is pulling in the 15 most recent entries and then paginates the rest.  This works fine in Firefox and Safari, but for some reason in IE6 & IE7, it appears to load ALL of the entries at once in the background (you can see in the status bar it counts down the remaining files from about 1200 down!) and then displays the most recent 15.  Any idea what’s going on here and how to fix it?  My code is a bit long, so I’ll break it up into two posts.  A live sample can be viewed at http://learningcenteradvantage.com/index.php/learning_center/aablog/

    My code is below:

    {embed="learning_center/header"}
    {embed="learning_center/nav" loc="button3"}
        <div id="contentwellSide">
            <div id="sideBar">
                {exp:weblog:calendar switch="calendarToday|calendarCell" weblog="aablog"}
                
                <table class="calendarBG" border="0" cellpadding="0" cellspacing="0" summary="Agent Advantage Learning Center Calendar">
                    <tr class="calendarHeader">
                    <th colspan="7">{date format="%F %Y"}</th>
                </tr>
                <tr>
                    {calendar_heading}
                    <td class="calendarDayHeading">{lang:weekday_abrev}</td>
                    {/calendar_heading}
                </tr>
                
                {calendar_rows }
                {row_start}<tr>{/row_start}
                
                    {if entries}
                    <td class='{switch}' align='center'><a href="http://{day_path=aablog/}">{day_number}</a></td>
                    {/if}
                
                    {if not_entries}
                    <td class='{switch}' align='center'>{day_number}</td>
                    {/if}
                
                    {if blank}
                    <td class='calendarBlank'>{day_number}</td>
                    {/if}
                
                {row_end}</tr>{/row_end}
                {/calendar_rows}
                </table>
                {/exp:weblog:calendar}
    
                <h2 class="sideTitle">Categories:</h2>
                    <ul>
                    {exp:weblog:categories weblog="aablog" style="linear"}
                        <li><a href="http://{path=learning_center/aablog}">{category_name}</a> {exp:query sql="SELECT count(exp_category_posts.entry_id) AS post_count FROM exp_category_posts WHERE exp_category_posts.cat_id = {category_id} "}
                        ({post_count})
                        {/exp:query}</li>
                    {/exp:weblog:categories}
                    </ul>
                
                <h2 class="sideTitle">Monthly Archives:</h2>
                    <ul>
                    {exp:weblog:month_links weblog="aablog" limit="12" sort="desc"}
                        <li><a href="http://{path=learning_center/aablog}">{month}, {year}</a></li>
                    {/exp:weblog:month_links}
                    </ul>
                
                <h2 class="sideTitle">Links:</h2>
                    <ul>
                    {exp:linklist:entries orderby="url_title" sort="ASC" status="open" dynamic="off"}
                        <li><a href="http://{linklist:url}" target="_blank" rel="noopener">{linklist:url_title}</a></li>
                    {/exp:linklist:entries}
                    </ul>
            </div>
            {exp:weblog:entries weblog="aablog" limit="15" paginate="bottom"}
            <div class="blog">
                <div class="post">
                    <div class="dateTime">
                        <div class="btm">
                            {entry_date format="%M"}
                            {entry_date format="%j"}
                            {entry_date format="%Y"}
                        </div>
                    </div>
                    
                    <div class="titleAuthor">
                        <h1><a href="http://{title_permalink=">{title}</a></h1>
                        <h4>By: {if guest_blogger !=""}{guest_blogger}{if:else}{url_or_email_as_author}{/if}</h4><p><br><br />
                    </div><br />
                    <br />
                        {body}<br><br />
                        Posted in {categories}<a href="http://{path=learning_center/aablog}">{category_name}</a> {/categories} | <a href="http://{comment_url_title_auto_path}">{comment_total} Comments »</a> | <span class="shareThis">{exp:share_this url="{title_permalink="learning_center/aablog"}" title="{title}" entry_id="{entry_id}" orientation="top"}<br />
                            <br />
                            <br />
                        {/exp:share_this}</span><br />
                        <br />
                </div><br />
            </div><br />
            {paginate}<br />
                Page {current_page} of {total_pages} page(s) {pagination_links}<br />
            {/paginate}<br />
            {/exp:weblog:entries}<br />
            <br />
            {exp:comment:entries weblog="aablog"}<br />
            {if no_results}<br />
                <em>There are no comments for this entry yet.</em><br />
            {/if}<br />
            <div class="{switch="commentBox|commentBox-alt"}"><br />
                {count}<br />
                <div class="comment"><br />
                    </p><h3><em>{url_or_email_as_author}</em>
                    {comment_date format='%D %M %j, %Y'} at {comment_date format='%h:%i %a'}</h3>
    <p>                {comment}<br />
                </div><br />
            </div><br />
            {paginate}<br />
                Page {current_page} of {total_pages} page(s) in comments {pagination_links}<br />
            {/paginate}<br />
            {/exp:comment:entries}</p>
    
    <p>        {exp:comment:preview}<br />
            {comment}<br />
            {/exp:comment:preview}

  • #2 / Jan 18, 2008 1:11pm

    mcneasep

    21 posts

    <div id="commentform">
            
            <br>
            
            {exp:comment:form weblog="aablog" preview="learning_center/aablog"}
            <h3>Leave a Comment</h3>
    <p>        {if logged_out}<br />
            <br />
            Name:<br><br />
            <input type="text" name="name" value="{name}" size="50" /><br />
            <br />
            <br />
            Email:<br><br />
            <input type="text" name="email" value="{email}" size="50" /><br />
            <br />
            <br />
            Location:<br><br />
            <input type="text" name="location" value="{location}" size="50" /><br />
            <br />
            <br />
            URL:<br><br />
            <input type="text" name="url" value="{url}" size="50" /><br />
            <br />
            {/if}<br />
            <br />
            <br />
            <br />
            <textarea name="comment" cols="50" rows="12">{comment}</textarea><br />
            <br />
            <br />
            {if logged_out}<br />
            Please enter the word you see in the image below:<br />
            <br />
            {captcha}</p>
    
    <p>        <input type="text" name="captcha" value="" size="20" maxlength="20" style="width:140px;" /><br />
            <br />
            <input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information<br />
            {/if}<br />
            <br />
            <input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?<br />
            <br />
            <br />
            <input type="submit" name="submit" value="Submit" /><br />
            <input type="submit" name="preview" value="Preview" /><br />
            <br />
            {/exp:comment:form}<br />
            </div><br />
    {embed="learning_center/footer"}

  • #3 / Jan 18, 2008 1:26pm

    Lisa Wess

    20502 posts

    Alright, you’ve got a lot going on there, including several third-party plugins and modules.  What you’ll need to do is create a totally blank template and put a weblog entries tag in there - see if the same behavior occurs.

    {exp:weblog:entries weblog="aablog" limit="15" paginate="bottom"}
    <a href="http://{title_permalink=">{title}</a>
    
                        
            {paginate}
                Page {current_page} of {total_pages} page(s) {pagination_links}
            {/paginate}
            {/exp:weblog:entries}

    Pop that on to a test template and let’s see if you see the same behavior.  As a note, ExpressionEngine doesn’t deliver those “entries” as files, so it sounds to me like IE is counting something totally unrelated. You might supply a link to the page in question so we can see for ourselves. =)

    Also, please include what version and build of EE you’re on.

  • #4 / Jan 18, 2008 1:40pm

    mcneasep

    21 posts

    It doesn’t seem to be loading them all now.  The page is located here http://www.learningcenteradvantage.com/index.php/aablog_test

  • #5 / Jan 18, 2008 1:50pm

    Lisa Wess

    20502 posts

    Ok, at this point we know that there isn’t a basic issue in ExpressionEngine, as it works on such a basic template. What you’ll need to do is a reduction and isolation.  Slowly add parts from the problem template to this one and find out where the glitch is. From there we should have a better idea of how to address it!

  • #6 / Jan 18, 2008 2:21pm

    mcneasep

    21 posts

    Well, I’ve basically gone through and sectioned off all the different portions of the page and commented them out, and it still drags on forever.  If I remove the weblog entries tag, it works.  There can be nothing else on the page other than the entries blog and it will hang like it’s been doing.  Any ideas?

  • #7 / Jan 18, 2008 2:26pm

    Lisa Wess

    20502 posts

    Ok, so in a totally blank template, the weblog entries tag does work fast and as expected, yes?  At what point does the slow loading start? What’s the *minimal* template you can have and still see the slowness?

    Also, what version and build of EE are you on, and are you running any extensions?

    You might also try turning on the Template Debugger in Admin -> System Preferences -> Output and Debugging, and post the results.

  • #8 / Jan 18, 2008 2:32pm

    mcneasep

    21 posts

    Sorry, I forgot to add that.  I’m using EE 1.6.1 Build 20071114.  I’m still playing around with the template trying to remove some of the includes I use for the nav, etc. to see if for some reason that’s causing it.  I’ll get back to you in a few minutes after I’ve tested it some more. 

    I’ll try debugging also and see if that helps. 

    The only extension in my extensions directory is “ext.tiny_mce.php”

  • #9 / Jan 18, 2008 2:56pm

    mcneasep

    21 posts

    It appears to be a pngfix script I have in the header (which explains why it’s an IE issue).  Guess I’ll have to find another way to set that up.  Thanks for your help.

  • #10 / Jan 18, 2008 3:30pm

    Lisa Wess

    20502 posts

    Sure, glad you were able to find it. I know, all too well, that reduction testing can be tedious - but sometimes it’s the fastest way to find out what’s going on. =)

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

ExpressionEngine News!

#eecms, #events, #releases