Be sure to checkout our newest add-on Reading Time Pro!

Compatibility updates:

  • Publisher is EE5 compatible, but it does not currently support the Fluid field (it's in the works).

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)

Sep 10, 2019

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

#2

Stephen T

Sep 10, 2019

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}

    {previous_page}
      <li>{phrase:previous_page}</li>
    {/previous_page}

    {page}
      <li {if current_page}class=“current”{/if}>{pagination_page_number}</li>
    {/page}

    {next_page}
      <li>{phrase:next_page}</li>
    {/next_page}

    {last_page}
      <li>{phrase:last_page}</li>
    {/last_page}
  </ul>
  {/pagination_links}
{/paginate}

{/exp:channel:entries}

#3

Stephen T

Sep 10, 2019

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 T

Sep 10, 2019

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)

Sep 10, 2019

Did you try the paginate_base parameter?

#6

BoldMinded (Brian)

Sep 10, 2019

Comment has been marked private.

#7

BoldMinded (Brian)

Sep 10, 2019

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

#8

Stephen T

Sep 11, 2019

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)

Sep 11, 2019

Comment has been marked private.

#10

Stephen T

Sep 11, 2019

Comment has been marked private.

Login to reply

Contact

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.