Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pagination.next_url returns wrong URL? #45

Closed
bobrocke opened this issue Sep 4, 2014 · 9 comments
Closed

pagination.next_url returns wrong URL? #45

bobrocke opened this issue Sep 4, 2014 · 9 comments

Comments

@bobrocke
Copy link

bobrocke commented Sep 4, 2014

Both on my test site and the Grav blog site, it seems that pagination.next_url is returning the wrong URL. In both cases the lines:

    {% if pagination.hasNext %}
        <li><a href="{{ base_url }}{{ pagination.next_url }}">&raquo;</a></li>
    {% else %}
        <li><span>&raquo;</span></li>
    {% endif %}

in pagination.html.twig will create a link back to /blog, instead of /blog/page:2, under the next page arrow.

@rhukster
Copy link
Member

rhukster commented Sep 4, 2014

Your blog is not paging? what version of Grav are you running? Just tested on the demo and it's fine:
http://demo.getgrav.org/blog-skeleton/

@bobrocke
Copy link
Author

bobrocke commented Sep 4, 2014

When I click on the "next page" arrow on the bottom of the demo sites home (blog) page paginator, I hit the link http://demo.getgrav.org/blog-skeleton/blog. Don't you?

And shouldn't that be http://demo.getgrav.org/blog-skeleton/blog/page:2?

@rhukster rhukster added the bug label Sep 4, 2014
@rhukster
Copy link
Member

rhukster commented Sep 4, 2014

Actually your right! I was hitting the numeric button. I'll take a look. Thanks

@rhukster
Copy link
Member

rhukster commented Sep 4, 2014

Was a bug in the pagination plugin. The template file was just out of date with a method name change.

Probably easier just to change the template file with this one:

https://github.com/getgrav/grav-plugin-pagination/blob/develop/templates/pagination.html.twig

will replace your user/plugins/pagination/templates/pagination.html.twig file

@bobrocke
Copy link
Author

bobrocke commented Sep 4, 2014

That was fast! You guys sure are right on top of it. Another "selling" point for Grav.

Oh, yes, that fixed it. :)

@bobrocke bobrocke closed this as completed Sep 4, 2014
@rhukster
Copy link
Member

rhukster commented Sep 4, 2014

We would of fixed it quicker, but our GitHub notifications in HipChat stopped working for a bit, so we didn't notice this issue reported for nearly 20 minutes!

@w00fz
Copy link
Member

w00fz commented Sep 4, 2014

@bobrocke
Copy link
Author

bobrocke commented Sep 5, 2014

I notice that the Grav blog at http://getgrav.org/blog has the same error. The "next page" pagination arrow links to: http://getgrav.org/blog. The page number links and the "last page" arrow are fine.

@w00fz
Copy link
Member

w00fz commented Sep 5, 2014

Fixed both getgrav.org/blog and demo.getgrav.org/blog-skeleton/blog.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants