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: Pagination issues on 2nd Language version of site (ee3/publisher/structure)

Status Resolved
Add-on / Version Publisher 2.7.3
Severity
EE Version 3.5.15

Andrew Jones

Jan 26, 2018

We are creating a website with Publisher module (v 2.7.3). Major modules site using is Structure and Switchee.

My issue is: Pagination variable “current_page” that is working for me in English language is not working on other language. My code is “{if current_page} class=“active” {/if}”


Visit the news & industry information page on the site URL, try pagination on English version /en/news-industry-info/P3 and then try it on the welsh version: /cy/news-industry-info/P3 you will see that pagination doesnt work on Welsh Version

the template in question is news-industry-info/.landing

I have one more issue. You can see the Language switcher at top right side on the website. When you change the language, Pagination goes away in 2nd language. Can you please look into this too?

#1

BoldMinded (Brian)

Andrew, I’m betting this is an issue with your environment or your template logic or parsing. I have 2 local sites in which the pagination works fine in the default and non-default languages using the current_page variable. The second issue you reported contradicts the first… if the pagination disappears in the 2nd language, then how are you even testing if the current_page variable isn’t working?

In order for me to look into this more you’ll need to recreate the issue in a new clean EE environment with only Publisher installed and the minimal amount of entries and template code necessary to replicate the issue. Once we can be 100% sure it is a Publisher specific issue, then I can look into it.

#2

Andrew Jones

Comment has been marked private.

#3

BoldMinded (Brian)

Comment has been marked private.

#4

Andrew Jones

Hi Brian,

I got into the office today and our developer managed to resolve the issue by changing the priority column on exp__extensions table as follows:

Structure_EXT > core_template_route (change from 10 to 11) Publisher EXT > core_template_route (change from 11 to 10)

Thanks Neil

#5

BoldMinded (Brian)

Would you be willing to revert those priorities and try to build i sent? I’m curious if I was seeing the same thing you are seeing.

#6

BoldMinded (Brian)

Regardless of the priority settings, this should be fixed in the next release of Publisher 2.7.5

#7

Andrew Jones

Hi there!

I have tested this with the new version you gave me here: https://boldminded.com/support/ticket/1656

It’s still not compatible with pagination. I must go to database to change priorities to make it work with Structure module.

#8

BoldMinded (Brian)

I assume the url you’re viewing is a Structure page, and you probably have an embed tag in it with another entries tag, which is the one containing the entries to be paginated over?

#9

Andrew Jones

Exactly. So, the list page is not a structure URL but in order to maintain landing and detail page, We have put embed code in index.html file that will include landing page or detail page after checking segments.

{if segment_2}
    {if segment_2_category_id}
        {embed="{segment_1}/.landing"}
    {if:else}
        {exp:switchee variable="{segment_2}" parse="outward"}
            {case value="#^P(\\\\\\\\d+)$#|''"}
                {embed="{segment_1}/.landing"}
            {/case}
            {case value="archives"}
                {embed="{segment_1}/.landing"}
            {/case}
            {case default="Yes"}
                {embed="{segment_1}/.detail"}
            {/case}
        {/exp:switchee} 
    {/if}
{if:else}
    {embed="{segment_1}/.landing"}
{/if}
#10

BoldMinded (Brian)

That is the same scenario I had when I tested the fix, and its what is working for me in a production environment. If the switching of priorities works for you then I’d just keep it that way. I’ll keep an eye out for this to see if the issue crops up for anyone else. I can always just switch the priority for people, but I want to be 100% sure that is the right solution.

#11

Andrew Jones

Sure. That is now not a big problem for me because I know the temp fix. Let me know if any other user found the same issue and/or you fix it on upcoming release..

Thanks.

#12

BoldMinded (Brian)

Andrew, I’m unable to replicate this in my local site, which is a copy of demo.boldminded.com. I setup a new template that was assigned to a Structure page, that template had an embed in it paginating through the Cards channel entries. Regardless of language or the hook priority, pagination worked correctly. The next comment will have the latest build in it if you want to test. Feel free to login to the to the demo site to try to recreate the issue (you should be able to make new templates). The priorities on the demo site are Publisher at 11 and Structure at 10.

#13

BoldMinded (Brian)

Comment has been marked private.

Login to reply