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 URL incorrectly populated

Status Resolved
Add-on / Version Publisher 2.11.1
Severity
EE Version 5.2.4

Stephen T

Sep 10, 2019

We have a site running Publisher 2.11.1, but I’m running into an issue that seems like it might be similar to this fix from the 2.10.7 changelog:

- Pagination variable segments were incorrectly included in the publisher:canonical_url variable

On the site URL attached to this ticket, if you click on a pagination number at the bottom on that URL it works fine the first time. However, if you’re already on a page with a pagination segment, and then click on another pagination number, that new pagination segment is appended on to the end of the URL instead of replacing the currently pagination segment.

So if I’m on a page with a URL like http://www.site.com/es/news/P10 and then click on another pagination number, the URL becomes http://www.site.com/es/news/P10/P20.

This is only happening on the Spanish version of this particular site - it works fine on the English version, which made me think it might be a Publisher related issues.

Thanks for your help!

#1

BoldMinded (Brian)

What does your entries tag look like? (just the EE code, don’t need to see extra html)

#2

Stephen

Here’s the EE code:

{exp:channel:entries channel=”blog” status=”open|Featured” limit=”10” dynamic=”yes” order_by=”date” sort=”desc” paginate=”bottom” disable=”member_data”}

—code to pull in the blog post—

{paginate} {pagination_links} <ul class=”pagination” role=”menubar” aria-label=”Pagination”> {first_page} <li>{phrase:first_page}</li> {/first_page}

  &#123;previous_page&#125;
    <li><a href="http://{pagination_url}" class="page-previous">&#123;phrase:previous_page&#125;</a></li>
  &#123;/previous_page&#125;

  &#123;page&#125;
    <li {if current_page}class="current"{/if}><a href="http://{pagination_url}" class="page-{pagination_page_number}">&#123;pagination_page_number&#125;</a></li>
  &#123;/page&#125;

  &#123;next_page&#125;
    <li><a href="http://{pagination_url}" class="page-next">&#123;phrase:next_page&#125;</a></li>
  &#123;/next_page&#125;

  &#123;last_page&#125;
    <li><a href="http://{pagination_url}" class="page-last arrow">&#123;phrase:last_page&#125;</a></li>
  &#123;/last_page&#125;
</ul>

{/pagination_links} {/paginate}

{/exp:channel:entries}

#3

Stephen

Sorry - forgot to wrap my code in the code tags. Here it is again:

{exp:channel:entries channel="blog" status="open|Featured" limit="10" dynamic="yes" order_by="date" sort="desc" paginate="bottom" disable="member_data"}

---code to pull in the blog post---

{paginate}
  {pagination_links}
    <ul class="pagination clearfix" role="menubar" aria-label="Pagination">
      {first_page}
        <li><a href="http://{pagination_url}" class="page-first arrow">{phrase:first_page}</a></li>
      {/first_page}

      {previous_page}
        <li><a href="http://{pagination_url}" class="page-previous">{phrase:previous_page}</a></li>
      {/previous_page}

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

      {next_page}
        <li><a href="http://{pagination_url}" class="page-next">{phrase:next_page}</a></li>
      {/next_page}

      {last_page}
        <li><a href="http://{pagination_url}" class="page-last arrow">{phrase:last_page}</a></li>
      {/last_page}
    </ul>
  {/pagination_links}
{/paginate}
{/exp:channel:entries}
#4

Stephen

Strange - I’m not sure why it’s adding the “http://” before the {pagination_url} tag in all the links in the code block above. That isn’t in the actual code - just the {pagination_url} is in each href.

#5

BoldMinded (Brian)

Did you try the paginate_base parameter?

#6

BoldMinded (Brian)

Comment has been marked private.

#7

BoldMinded (Brian)

Have you tried to replicate this in a clean/new EE environment?

#8

Stephen

Hey Brian,

I added in the paginate base parameter and that seems to have fixed it for now. I was able to replicate the issue on a dev environment and my local environment so it doesn’t seem environment specific.

Thanks! Stephen

#9

BoldMinded (Brian)

Comment has been marked private.

#10

Stephen

Comment has been marked private.

Login to reply