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: Latest 3 entries in selected language won’t come up

Status Resolved
Add-on / Version Publisher 1.6.5
Severity
EE Version 2.10.1

Madelon

Aug 19, 2015

Description:
I would like to display the latest 3 channel entries in the selected language. In this case the 4 latest channel entries only have an English version, while I am watching the page in Dutch. Because of this I am not getting any results back.

Detailed steps to reproduce the issue:
1. Use the following code in the template: {exp:channel:entries channel="blog" dynamic="off" publisher_lang_id="{publisher:current_language_id}” publisher_enable_persistence=“n” publisher_cache=“yes” limit=“3” disable=“categories|category_fields|member_data|pagination”}
2. Persistent Entries in the settings is set to “yes”.
3. Show content fallback (FE) in the settings is set to “no”.

#1

BoldMinded (Brian)

Did you try removing the persistent_entries param from the tag? That’s probably what is doing it.

#2

Madelon

I have tried it without the publisher_enable_persistence param, but than I get the 3 latest English translations which I don’t want to show.

#3

Madelon

I have looked into the Module code. First the channel entries are being retrieved. The amount is being determined with limit. After that, there is a check if the entries have the correct language. If not the concerning entry is being popped out of the list.

#4

BoldMinded (Brian)

It’s working as intended. If there is no Dutch translation it will show the English translation as the fallback. That is what persistence is. There is a docs page on it.

#5

Madelon

Is there a possibility to show only the tree latest entries in the selected language?

#6

BoldMinded (Brian)

Publisher doesn’t modify limits. You need to use the native limit=”3” parameter. As mentioned, if you have persistence turned on, and you don’t have translations for non-default languages, then the default language value will be displayed for those entries when viewing the site in a non-default language. If you turn persistence off, which means that the entry will not be displayed if it does not have a translation, then the entries will not show up. If your selected language is Dutch, and the latest 3 entries that should show don’t have a Dutch translation, but entries 4-6 do have a translation, then they should be moved into positions 1-3, thus showing the 3 latest.

#7

Madelon

I am using the native limit. I meant that the channel entries retrieves the entries according to the limit that is set in the tag.

Persistent Entries in the cp is now set to “No”. I tried:

{exp:channel:entries channel=”blog” dynamic=”off” publisher_lang_id=”{publisher:current_language_id}” publisher_enable_persistence=”n” publisher_cache=”yes” limit=”3” disable=”categories|category_fields|member_data|pagination”} -> No results

{exp:channel:entries channel=”blog” dynamic=”off” publisher_cache=”yes” limit=”3” disable=”categories|category_fields|member_data|pagination”} -> The tree last English entries.

{exp:channel:entries channel=”blog” dynamic=”off” publisher_lang_id=”{publisher:current_language_id}” publisher_cache=”yes” limit=”3” disable=”categories|category_fields|member_data|pagination”} -> The tree last English entries.

I also tried the above template tags with Persistent Entries set to “Yes”. I am getting the same results. What am I missing?

#8

BoldMinded (Brian)

Madelon, I don’t think you’re missing anything. After looking into it for a few minutes I think something is broken with the persistence right now. Sorry for any issues this causes. Due to my current schedule I may not have a fix for this for a week or two.

#9

Madelon

Glad to read that something might not be right and you will look into it.

I now also noticed an inconsistency with the persistency. On another page I am getting the results I want, but can’t quite put my finger on the difference right now. If I know more, you will hear from me.

#10

Madelon

I found out what the problem is: pagination has to be used for the persistence to work. I used disable=”categories|category_fields|member_data|pagination”. Instead of that I now use disable=”categories|category_fields|member_data” and the pagination tags: {paginate}{/paginate}.

For now I have a solution. I would be great though if persistence also works without the use of pagination. 😉

#11

BoldMinded (Brian)

Madelon, I’m going to close this b/c the build I sent you fixes this.

And for anyone else who sees this, it’ll be in the 1.6.6 release.

Login to reply