getgrav / grav-plugin-pagination

Grav Pagination Plugin
https://getgrav.org
MIT License
27 stars 20 forks source link

Since update to v1.4.5 today, pagination broken, shows https://page:2/ #61

Closed Moonbase59 closed 7 months ago

Moonbase59 commented 7 months ago

I updated the pagination plugin today, to version 1.4.5. To be sure, I also cleared the Grav site’s cache using Admin UI, and reindexed TNT search. I used the Admin UI to update.

I’m running Grav v1.7.44 - Admin v1.10.44.

Now, when clicking the page 2 link on my blog, it tries to access https://page:2/instead of my site.

Help! What can I do to fix this, or maybe revert to the version before?

Moonbase59 commented 7 months ago

As an immediate rescue measure, I manually reverted the changes made in https://github.com/getgrav/grav-plugin-pagination/commit/ed158b015e3d320964af8d08050d59c6e689622d#diff-58a71fdc6dbd0b2aa7dc1c24f1224f6c0fe1d21304e2e87b3914d8b19d952d59 in my file /user/plugins/pagination/templates/partials/pagination.html.twig. This at least made the site working again (https://my.domain.tld/page:2 instead of https://page:2/).

But I’m of course unhappy with directly modifying plugin code that will be overwritten on next update, probably with the same bug…

Found an old similar issue in https://github.com/getgrav/grav-plugin-pagination/commit/f4465500c3cddf1905346867258c4e8573484907. Maybe the fix just needs to set the parentheses differently so base_url stays intact?

rhukster commented 7 months ago

Will look into this asap. thanks.

rhukster commented 7 months ago

1.4.6 is available with the previous fixes reverted. I will need to investigate this further as I did test locally and worked fine for me with absolute_url's enabled and disabled. So something weird going on. I just think the prior fix was working 100% with absolute_url's off. As this is default behavior, and used my 99.9% of people, it's probably best to stick with this version until I can find a proper fix that works for all scenarios.

Moonbase59 commented 7 months ago

Thanks for the real fast fix! I can confirm v1.4.6 works here again.

Fortunately, the change wasn’t big, so I could fix it by reverting, but yes, it’d be nice to have a solution that works with all setups.