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: Entries returning double the amount

Status Resolved
Add-on / Version Publisher 1.3.3
Severity Critical
EE Version 2.7.3

Niall Thompson

Jun 18, 2014

I am loading entries via the Low Events addon.

If I limit the entries to display 6 it returns 12. If I set it to limit=“4” it returns 8.

it always doubles the number of entries returned.

I had put in a ticket with Low and here is what he discovered:

It’s looking like this is Publisher’s doing. I’ve swapped the LE:entries tag with the native channel:entries tag, and got double the amount of entries, too, ruling out LE.

I disabled the Publisher hook that hooks into the channel_entries_query_results hook with this query:

UPDATE exp_extensions SET enabled = 'n' WHERE extension_id = 119;


...and that made things work as expected again. To enable that hook again, use this query:

UPDATE exp_extensions SET enabled = 'y' WHERE extension_id = 119;

Here is my template code:

https://gist.github.com/niallthompson/697ba0a3cbe5221960e5/

It’s on the broadcasts index template that I’m having the issue.

Appreciate any help.

Niall

#1

BoldMinded (Brian)

Have you tried disabling other add-ons? E.g, getting it down to only EE and Publisher to see if the issue still occurs? This is the first report of such a bug, so it seems a bit out of the ordinary that its doubling results.

#2

BoldMinded (Brian)

Also, try disabling Publisher’s hooks 1 by 1 until it starts working again, maybe we can at least narrow it down to a specific block of code. Don’t disable the sessions_start and sessions_end hooks though, they need to be there.

#3

BoldMinded (Brian)

I forgot to look at your template code earlier, but now I’m seeing that its a low_events loop. Have you tried the same loop but use channel:entries instead? If this is a Low Events specific issue you’ll need to contact Low.

#4

BoldMinded (Brian)

Was not able to replicate, and have not heard from customer. Closing ticket.

#5

Niall Thompson

Hi, thanks for getting back to me. I am not receiving notifications when this ticket is updated so we both probably thought we were ignoring each other. 😊

The hook in question is channel_entries_query_result.

Not sure what to do from here…

#6

BoldMinded (Brian)

Niall, I installed Low Events and setup a test and wasn’t able to replicate this. I used the same template code you included too. Publisher was also in play and I saved entries to multiple languages and never saw a duplication of entries. Something else is at play in your environment, so in order for me to look into this further you’ll need to replicate this in a clean EE environment. Install only Publisher, Low Events, or whatever else 1 at a time until the issue starts to happen again. Or make a backup and start uninstalling things from your current site until the issue starts, then the last thing un-installed will lead us to where the issue is.

Let me know when you’ve replicated this in the clean environment, or by removing stuff from your current environment until things start working again, then I’ll take a look.

#7

Niall Thompson

Hi there,

I’m also having some entries not being returned at all.

I did some isolating in a new template (broadcasts/index-el). The only difference between the two sections is the second one has limit=”6” as a parameter. They both use the native {exp:channel:entries} tag and no other modules. Clearly something is modifying the query with respect to the limit. As you will note there are 25 broadcasts, and with a limit of 6 we should have 5 pages, but only 2 are showing. The first page has 12 entries but the second only has 7. Clearly a third-party module is intercepting the DB query and rewriting it, and it does appear to be Publisher. When I disable the code for channel_entries_query_result then the limit works just fine.

Let me know your thoughts.

Many thanks

Niall

#8

BoldMinded (Brian)

Niall, it might be a day or two before I can test this again. I do know that Publisher only modifies the limit clause on queries for Matrix and Grid fields… it doesn’t do that for entries. Do the events entries contain Matrix or Grid fields though?

#9

BoldMinded (Brian)

Also, were you replicating this in an environment with only Publisher installed, or Publisher and Low Events and no other add-ons? We need to be 100% sure it is something with one of those 2 add-ons before I go down the rabbit hole.

#10

BoldMinded (Brian)

Have you tried Publisher 1.4.1? I see you’re still using an older version. I’m also still unable to replicate this. What is your “persistence” settings set to in the Publisher settings? Can you send me a screenshot of your Publisher settings page or submit the Support form in the Publisher menu in the CP? Did you remove all other add-ons or create a clean installation of only Publisher and Low Events to replicate this or are there still other add-ons installed?

#11

Niall Thompson

Hi there,

Thanks for getting back to me.

The entries do not use Matrix or Grid fields. Updating to 1.4.2 didn’t help. I’ve sent you the support form from the CP.

I’ve also setup a very basic template that only includes the affected code.

<a href="http://{title_permalink=%27broadcasts/view%27}%22role=%22complementary" class="archive t-clear d-clear d-all">
{broadcast_image}
{image:url:medium}</a>
{/broadcast_image}
<figcaption><a href="http://{title_permalink=broadcasts/view}">{title}</a>
<a>{broadcast_date:start_date format="%j %F %Y"}</a></figcaption>
</figure>

{paginate}
{if {total_pages} > 1}
<nav class="centered m-clear t-clear d-clear" role="toolbar">
<ul class="pagination">
{pagination_links}
{previous_page}<li><a href="http://{pagination_url}">«</a></li>{/previous_page}

{page}<li {if current_page}class="active"{/if}><a href="http://{pagination_url}">{pagination_page_number}</a></li>{/page}

{next_page}<li><a href="http://{pagination_url}">»</a></li>{/next_page}
{/pagination_links}
</ul>
</nav>
{/if}
{/paginate}

{/exp:{module}:entries}

</aside>

If I remove the pagination code block it doesn’t return twice the entries.

Any thoughts on this?

Appreciate your time.

Niall

#12

Niall Thompson

Also 3 particular entries were not appearing at all.

Removing the pagination block displays these entries too.

#13

BoldMinded (Brian)

Have you tried uninstalling all other add-ons yet though? If another add-on is using a shared hook it could be messing up the data. We won’t know if that is the issue until only Publisher is installed, then add the other add-ons until the issue starts again, or by un-installing add-ons until Publisher is the only one left, and if its still happening then we know 100% its Publisher. Until you do this I can’t do anything since I can’t replicate it locally.

I also didn’t get the support email. Are you sure EE is sending emails? I just tested the sending of the emails last night so I know it works as long as EE can deliver it.

#14

Niall Thompson

I totally understand.

I will setup a clean install on Saturday and do as you have advised.

I’ll let you know the results.

Many thanks.

#15

BoldMinded (Brian)

Closing this ticket for lack of updates and inability to replicate the issue. If it becomes an issue again just re-open or create a new ticket.

Login to reply