EllisLab text mark
Advanced Search
     
Sort not working on page 1 of paginated entries
Posted: 10 July 2012 01:39 PM   [ Ignore ]
Avatar
Joined: 2009-01-21
206 posts

Hey guys, here’s an odd one. I’ve got a channel entries tag that’s been fine for some time but since upgrading to 2.5.2, the client has noticed that the first page of entries isn’t ordered correctly. Here’s the code:

{exp:channel:entries channel="blog" disable="member_data|trackbacks|categories|category_fields" status="open" limit="7" paginate="bottom" orderby="date" sort="desc"}

 {if no_results}
  
<h1>{lv-blog-no-posts-in-category}</h1>
 
{/if}

 {if count 
== AND segment_2 == 'category'}
  
<h1>{lv-blog-category-headline} {segment_3}</h1>
 
{/if}
 
 {snip
-blog-article}
   
 {paginate}
  
<span class="pagination">{pagination_links}</span>
 
{/paginate}

{
/exp:channel:entries} 

This is mostly snippets but you can see there’s not much going on. It all works fine when you go to page 2 and beyond, so it only appears to have an issue when there is no pagination in the URL.

The live site is at http://www.myredlandroof.co.uk/thinking-roofing but the design doesn’t include the date so I’ve attached a snapshot of the first page as it is today in the CMS and in the template

Any suggestions?

Thanks

 
Posted: 10 July 2012 03:03 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2012-06-12
149 posts

Hi Russ,

Try the following:

{exp:channel:entries channel="blog" disable="member_data|trackbacks|categories|category_fields" status="open" limit="7" paginate="bottom" sort="desc"}

 {if no_results}
  
<h1>{lv-blog-no-posts-in-category}</h1>
 
{/if}

 {if count 
== AND segment_2 == 'category'}
  
<h1>{lv-blog-category-headline} {segment_3}</h1>
 
{/if}
 
 {snip
-blog-article}
   
 {paginate}
  
<span class="pagination">{pagination_links}</span>
 
{/paginate}

{
/exp:channel:entries} 

Mike

 
Posted: 11 July 2012 04:32 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2005-10-18
7340 posts

Hi Russ,

What version did you update from?

There have been some changes in pagination, so the previous version may have worked a bit differently.

However, I like Mike’s suggestion, simply because channel entries orders by date by default. If we take that parameter out, we can simplify the tag with the same expectation of results.

I look forward to your reply!

Cheers,

 Signature 

How may I help you?

 
Posted: 15 July 2012 11:20 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2009-01-21
206 posts

Thanks guys,

That change didn’t make any difference to the ordering. Initially we went from 2.1.3 to 2.4.0, then a couple of months later from 2.4.0 to 2.5.2. I mention the first update as it could be that the ordering issue wasn’t noticed at that time.

 
Posted: 17 July 2012 01:03 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hey Russ,

I am glad that Dan and the community were able to provide some direction.

Where do things stand now? Is there anything else I can help with?

Cheers,

 Signature 

Recent version: EE 2.5.4 | Forum Module 3.1.10 | MSM 2.1.4 | 2.x Bug Tracker | Version Upgrade

 
Posted: 17 July 2012 01:05 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2009-01-21
206 posts

Hi Shane.

I’m afraid not. If you look at my last post you’ll see I provided details of the upgrade as the issue still remains. Happy to provide system access if necessary.

 
Posted: 18 July 2012 12:31 PM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hey Russ,

Sounds like a plan.

Please be on the lookout for an email from EllisLab.

Cheers!

 Signature 

Recent version: EE 2.5.4 | Forum Module 3.1.10 | MSM 2.1.4 | 2.x Bug Tracker | Version Upgrade

 
Posted: 20 July 2012 08:34 AM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Avatar
Joined: 2009-01-21
206 posts

Thanks Shane. Email received and details sent back to you yesterday.

 
Posted: 20 July 2012 05:37 PM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hey Russ,

Looks like Dan is taking care of you in support. I think he needs some more information to continue though.

Thanks,

 Signature 

Recent version: EE 2.5.4 | Forum Module 3.1.10 | MSM 2.1.4 | 2.x Bug Tracker | Version Upgrade

 
Posted: 23 July 2012 05:17 AM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Avatar
Joined: 2009-01-21
206 posts

Thanks Shane. I haven’t had any requests for more info. Could we get this one bumped along please as it’s been ongoing for a while?

Thanks

 
Posted: 24 July 2012 11:01 AM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Avatar
Joined: 2005-10-18
7340 posts

Hi Russ,

You should have a request for more information in your inbox.

It is completely my fault, and I apologize. I didn’t mark a reply as “public”, so you never received it.

I apologize for your delays and I appreciate your patience.

Cheers,

 Signature 

How may I help you?

 
Posted: 24 July 2012 11:15 AM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Avatar
Joined: 2009-01-21
206 posts

Thanks Dan - I’ve replied to your email

 
Posted: 24 July 2012 12:54 PM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hi,

Just letting onlookers know that we are working with Russ in Private Support.

Will update this ticket when we have more information.

Cheers,

 Signature 

Recent version: EE 2.5.4 | Forum Module 3.1.10 | MSM 2.1.4 | 2.x Bug Tracker | Version Upgrade

 
Posted: 25 July 2012 02:23 PM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Avatar
Joined: 2008-01-31
4773 posts

After working with Russ privately, we figured out the problem. Some of the entries were marked as stickies, which necessarily puts them at the top of any Channel Entries output.

 Signature 

Need some help? | Current Versions: EE 2.6.1 // MM 1.2.1