WordPress.org

Making WordPress.org

Opened 11 months ago

Last modified 5 weeks ago

#4092 new defect

Theme Directory JS should handle pagination

Reported by: dd32 Owned by:
Milestone: Priority: normal
Component: Theme Directory Keywords: seo needs-patch
Cc:

Description

The Theme Directory currently doesn't handle pagination requests, but should. This is a spin-off of #4063.

A request for https://wordpress.org/themes/browse/popular/page/7/ should display the results of page 7 and the river of themes thereafter and probably a warning at the top of the page that there's other results that are not displayed.

Change History (7)

#1 @dd32
11 months ago

  • Keywords needs-patch added

Unfortunately the JS version of the Theme Directory is written with Backbone and in such a way that it always starts at Page 0, I've attempted a few times to make it handle it correctly, but my Backbone skillset is so rusty that I can't make it work in such a way that works well.

I've marked this as lowest as it's a long-time problem and IMHO is unlikely to be a simple fix. If someone has backbone skills, we'll happily bump up the priority.

Once the Pagination is working, <link rel="next|prev" should also be added per #4063, https://meta.trac.wordpress.org/attachment/ticket/4063/themes.4063.diff should work for that.

#2 @jonoaldersonwp
11 months ago

Not to be a pain, but are we conflating complexity with importance? This is liable to have a significant impact on performance, so I'd be keen for it to have a higher priority, despite the challenge...

#3 @dd32
11 months ago

  • Priority changed from lowest to normal

Just being realistic. The problems that this causes doesn't outweigh the technical complexity of actually implementing it IMHO.

A temporary solution that I'll add today is that any paginated requests will just be dropped and redirected back to page 1 for JS users. Not ideal I'm sure, but better than the status-quo.

#4 @dd32
11 months ago

In 8126:

Theme Directory: Add a handler for paginated requests of archives. This doesn't support paginated requests, it simply ensures they don't result in a "No themes found" page.

See #4092.

#5 @dd32
11 months ago

In 8127:

Theme Directory: Cache bump after r8126.

See #4092.

#6 @dd32
5 weeks ago

#4814 was marked as a duplicate.

#7 @dd32
5 weeks ago

#4814 was marked as a duplicate.

Note: See TracTickets for help on using tickets.