boonebgorges / buddypress-docs

GNU General Public License v3.0
106 stars 44 forks source link

pagination in "all docs" is broken #438

Closed dubcube closed 9 years ago

dubcube commented 9 years ago

Pagination works in group docs, but is broken on "all docs", throwing a 404 when selecting a page number or the next page

boonebgorges commented 9 years ago

What version of WP are you running? It's possible that this is a WP bug introduced in 4.1: https://core.trac.wordpress.org/ticket/30831

On 01/16/15 23:48, Chris Saldana wrote:

Pagination works in groups, but is broken on "all docs" and sends you to 404 pages when selecting a page.or the next page

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-docs/issues/438.

dubcube commented 9 years ago

it's 4.1, and this is the only area on the site this issue is occurring; viewing documents under a group seems to be the only paginate situation of buddypress docs that works. as for the described issue in the above bug link: the paginate links are not pointing to the current page, but instead to a non-existent one.

dubcube commented 9 years ago

i also added the add_args param to the only paginate_links code i found in buddypress-docs, which didn't do anything.

boonebgorges commented 9 years ago

Thanks for doing some debugging. I can't seem to reproduce this. Have you tried refreshing your permalinks? Go to Dashboard > Settings > Permalinks, and re-save your existing settings.

If that still doesn't work, can you please share the URL format you see when the page 404s? Is it example.com/docs/page/2? Are you by chance using a custom slug instead of docs?

dubcube commented 9 years ago

i re-saved the permalink structure to no avail. it's set at "post name"

"all docs" pagination doesn't work: http://governingus.com/docs/ ( e.g. http://governingus.com/docs/?paged=2 )

group docs pagination works: http://governingus.com/groups/florida-scandal/docs/ ( e.g. http://governingus.com/groups/florida-scandal/docs/?paged=2 )

there aren't many docs on it, so i changed pagination to 2/page so you can see; lemme know when you checked it out so i can revert it.

On Tue, Jan 20, 2015 at 2:25 PM, Boone Gorges notifications@github.com wrote:

Thanks for doing some debugging. I can't seem to reproduce this. Have you tried refreshing your permalinks? Go to Dashboard > Settings > Permalinks, and re-save your existing settings.

If that still doesn't work, can you please share the URL format you see when the page 404s? Is it example.com/docs/page/2? Are you by chance using a custom slug instead of docs?

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-docs/issues/438#issuecomment-70726280 .

boonebgorges commented 9 years ago

It's possible that "post name" is the problem. I'll try to have a look when I get a chance. Feel free to change the pagination back; unfortunately, there's not much I can debug on the front end.

On 01/20/15 16:32, Chris Saldana wrote:

i re-saved the permalink structure to no avail. it's set at "post name"

"all docs" pagination doesn't work: http://governingus.com/docs/ ( e.g. http://governingus.com/docs/?paged=2 )

group docs pagination works: http://governingus.com/groups/florida-scandal/docs/ ( e.g. http://governingus.com/groups/florida-scandal/docs/?paged=2 )

there aren't many docs on it, so i changed pagination to 2/page so you can see; lemme know when you checked it out so i can revert it.

On Tue, Jan 20, 2015 at 2:25 PM, Boone Gorges notifications@github.com wrote:

Thanks for doing some debugging. I can't seem to reproduce this. Have you tried refreshing your permalinks? Go to Dashboard > Settings > Permalinks, and re-save your existing settings.

If that still doesn't work, can you please share the URL format you see when the page 404s? Is it example.com/docs/page/2? Are you by chance using a custom slug instead of docs?

— Reply to this email directly or view it on GitHub

https://github.com/boonebgorges/buddypress-docs/issues/438#issuecomment-70726280

.

  • Chris Saldana | 850-684-0116 | chris@dubcube.com

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-docs/issues/438#issuecomment-70738102.

dubcube commented 9 years ago

which permalink structure was it designed to work on?

boonebgorges commented 9 years ago

It wasn't designed to work on any permalink structure in particular, but '%post_name%' introduces special problems in some cases.

dubcube commented 9 years ago

Which one(s) do you know it works on?

pierre-dickinson commented 9 years ago

hi Boon, pagination is still broken on 'all docs' page please give me a clue! i've noticed your fix here: https://github.com/boonebgorges/buddypress-docs-wiki/commit/795d91119ff3b6fcc5e265ad4d6249c58a382b0b but i still have a bug after page #2 (it works on number 1 and 2 but not 3, here is my permalink structure:

http://www.mysite.com/docs/page/2/ (this one works)

http://www.mysite.com/docs/page/2/?paged=3 (this one doesn't works, obviously...)

do i have to rewrite something in the htaccess rules?

boonebgorges commented 9 years ago

@mecanographik If you can narrow down that it is a problem with the /%postname%/ permalink structure, it'd be a step in the right direction.

pierre-dickinson commented 9 years ago

i can't test with the default permalink structure because the default structure isn't buddypress compatible ;-( i've try some other permalink structure but it's still buggy

boonebgorges commented 9 years ago

Can you please give any additional information about the ways in which "it's still buggy"? What structures have you tried? WHat's the behavior that you're seeing? What are the URLs in the pagination links? What do you see when you click on the links? Etc. As I can't reproduce this bug locally, I'll need as much help as possible to guess what the problem might be for others.

On 03/05/15 09:47, Pierre Dickinson wrote:

i can't test with the default permalink structure because the default structure isn't buddypress compatible ;-( i've try some other permalink structure but it's still buggy

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-docs/issues/438#issuecomment-77375735.

pierre-dickinson commented 9 years ago

ok, but as i said , my url structure is: http://www.mysite.com/docs/page/2/ (this one works) so it means i can click on "2" when i am on "1" but if i click on "3" i get this: http://www.mysite.com/docs/page/2/?paged=3 (this one doesn't works...) why can't i just have: http://www.mysite.com/docs/page/3/ it would be nicer...

what is your permalink structure for the page#3 ? is it the same? i had the same problem with buddypress groups pagination, but it was fixed with the latest buddypress plugin's update. i can't tell you more about my permalink setting, i don't have a custom rewriting setting... thanks for your advice anyway!

boonebgorges commented 9 years ago

Can I ask someone on this ticket to check out 99cb2de to see if it solves the problem for them?

pierre-dickinson commented 9 years ago

i didn't find a solution, i just can tell you i have access to the page#1, #2 and #3 from the pagination links but not #4, #5 and #6 ... (i have 62 documents listed) this pagination link works: http://www.wob.coop/docs/?paged=3

this pagination link works too: http://www.wob.coop/docs/page/2/?paged=3

but not this one! http://www.wob.coop/docs/page/2/?paged=4

really weird ;-( any suggestion?

boonebgorges commented 9 years ago

@mecanographik Have you tried the changes in 99cb2de? Those should remove the ?paged argument altogether.

pierre-dickinson commented 9 years ago

thanks, it has removed the page argument but i still have a 404 error after /page/4/ it seems i can access to more page (from 1 to 4 on a total of 10 or from 1 to 3 on a total of 9 pages) for example if i have more document (total count)... really weird!

boonebgorges commented 9 years ago

@mecanographik So, to be clear, clicking on the 5 link leads you to /page/5/, but you're seeing a 404? Hm. Is the pagination text correct on the pages that work properly? ("Viewing 31-34 of 34 docs" en anglais, je sais pas comment on l'a traduit en français)

pierre-dickinson commented 9 years ago

Hi @boonebgorges , i see you're fluent french, mes compliments!

on the (working) page 4, the text below the list is : "31-40 de 96 documents" and the page url is : http://www.mywebsite.com/docs/page/4/ Here is what i get in the pagination link: « 1 2 3 4 5 6 … 10 » ("4" is the current unlinked item) i get a 404 error on the page #5 (which is the 'middle-page") and all pages after #5

on the (404) page #5, the page url is: http://www.mywebsite.com/docs/page/5/ the pagination link on page 4 to go to page 5 is the same (so it's correct)...

What is interesting : if 'im logged in as a normal user, i only have access to 58 documents (which is normal), than only the pagination links on page 1 and 2 are working ! and the text below the list is : "1-10 de 58 documents" Here is what i get in the pagination link: 1 2 3 … 6 » i get a 404 error on the page #3 (which is middle) and all pages after #3

conclusion: the pagination link is correct on all pages before the "middle pagination link" hypothese: maybe the "current link" generated in bp docs pagination is causing an issue...

illustration: if i've got 10 pages, i can go to the any page before page 5 if i've got 6 pages, i can go to any page before page 3 etc...

Thanks for your help

pierre-dickinson commented 9 years ago

@boonebgorges i can send you a private access to the website to check it out if you want ;-) tell me

boonebgorges commented 9 years ago

Very strange. I have a feeling that this problem is happening due to a configuration or plugin conflict issue. Have you reproduced with no other plugins active (except BP of course)?

On 03/17/15 04:49, Pierre Dickinson wrote:

Hi Boone, i see you're fluent french, mes compliments!

on the (working) page 4, the text below the list is : "31-40 de 96 documents" and the page url is : http://www.mywebsite.com/docs/page/4/ Here is what i get in the pagination link: « 1 2 3 4 5 6 … 10 » i get a 404 error on the page #5 https://github.com/boonebgorges/buddypress-docs/issues/5 (which is the 'middle-page") and all pages after #5 https://github.com/boonebgorges/buddypress-docs/issues/5

on the (404) page #5 https://github.com/boonebgorges/buddypress-docs/issues/5, the page url is: http://www.mywebsite.com/docs/page/5/ the pagination link on page 4 to go to page 5 is the same...

What is interesting : if 'im logged in as a normal user, i only have access to 58 documents (which is normal), than only the pagination links on page 1 and 2 are working ! and the text below the list is : "1-10 de 58 documents" Here is what i get in the pagination link: 1 2 3 … 6 » i get a 404 error on the page #3 https://github.com/boonebgorges/buddypress-docs/issues/3 (which is middle) and all pages after #3 https://github.com/boonebgorges/buddypress-docs/issues/3

conclusion: the pagination link is correct on all pages before the "middle pagination link" hypothese: maybe the "current link" generated in bp docs pagination is causing an issue...

illustration: if i've got 10 pages, i can go to the any page before page 5 if i've got 6 pages, i can go to any page before page 3 etc...

Thanks for your help

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-docs/issues/438#issuecomment-82206241.

pierre-dickinson commented 9 years ago

it has been a while since i've tested on the dev version without any plugin (except BP), so i'm gonna run a brand new test, we keep you in touch, thanks for your consideration !

pierre-dickinson commented 9 years ago

it's not a plugin conflict, i've got the same issue with only bp and bp docs activated (and my prettylinks updated) it could be a jquery issue but i doubt it. i will check if it changes anything without your "current link" script 99cb2de : https://github.com/boonebgorges/buddypress-docs/commit/99cb2dee79689f579780aa8d0e514ea14694fda4

pierre-dickinson commented 9 years ago

even if i switch to another theme (Twenty fifteen) i still get the same issue ;-( did you test your plugin with more than 100 docs ?