Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: orderby=“date” + limit in channel:entries broken when Persistent Entries are disabled

Status Resolved
Add-on / Version Publisher 1.6.8
Severity
EE Version 2.10.2

Dennis Frank

Jan 04, 2016

Description:

With disabled Persistent Entries the channel entries are not sorted by date (the default order) when the limit parameter is present.


Detailed steps to reproduce the issue:

1. disable Persistent Entries in Publisher settings
2. add channel:entries tag with limit parameter and (default) orderby=“date”
3. entries are sorted by entry_id instead of date

Without limit parameter or enabled Persistent Entries ordering works as expected.

 

#1

BoldMinded (Brian)

Thanks for the report. I’ll try to replicate this locally today and get back to you.

#2

Dennis Frank

Thanks Brian.

We discovered the bug this morning (CET). The site (re)launch is planned for tomorrow. Hope you can find a quick fix. Thanks!

#3

BoldMinded (Brian)

Are you viewing the site in the default language, or non-default language when this happens?

#4

Dennis Frank

It happens in the default language. Non-default language seems okay.

#5

BoldMinded (Brian)

So far I’m unable to replicate this

https://www.dropbox.com/s/lcyznj3gulattng/Screenshot 2016-01-04 07.51.06.png?dl=0 https://www.dropbox.com/s/ol9g9ovfydnvld0/Screenshot 2016-01-04 07.51.26.png?dl=0

My entries tag {exp:channel:entries channel=”pages” dynamic=”no” publisher_fields=”n” limit=”3” orderby=”date” sort=”asc”}

#6

Dennis Frank

Can you check out the provided sample site?

It’s a fresh EE install with Publisher as the only add-on.

Check out site/index template and the test entries in the “test” channel.

#7

BoldMinded (Brian)

Comment has been marked private.

#8

Dennis Frank

Hm. I am logged in (checked it twice) but I can’t see you previous comment: “Comment has been marked private.”

#9

BoldMinded (Brian)

I just went ahead and updated the files.

#10

BoldMinded (Brian)

Dennis, does this page look correct now? http://publisher-debug.df-pro.de/

#11

Dennis Frank

Yes. This looks correct. What have you done?

#12

BoldMinded (Brian)

Line 1175 of models/publisher_entry.php I made sure the new result array was sorted the same as the original.

if ( !$is_persistence_enabled && ($this->is_paginating || $this->is_filtered_entries))
        {
            // $results = array_values(array_reverse($entries));
            $results = ee()->publisher_helper->sort_array_by_array($entries, array_column($results, 'entry_id'));
        }
#13

Dennis Frank

Thanks Brian. That works! Will you put this into the next update?

#14

BoldMinded (Brian)

Most certainly will 😊

Thanks for the confirmation.

#15

BoldMinded (Brian)

Confirmed fixed by another customer as well. Will be in the next release.

Login to reply