canonical / ubuntu.com

The official website for the Ubuntu operating system
https://ubuntu.com
Other
185 stars 189 forks source link

Pagination does not work on ubuntu.com/security/notices #13981

Closed seva-luchianov closed 3 days ago

seva-luchianov commented 1 week ago

If you navigate to any page other than the first page on https://ubuntu.com/security/notices, you do not see the expected results. The results you do see are ancient notices (USN-12-1 up through USN-20-1) from 2004 and are the same for any subsequent page.

I believe this is related to passing in the ?offset= query string which is used for pagination on both the main page and the https://ubuntu.com/security/notices.json API.

When using the json API, passing in the ?offset= query string causes a 503 error response. Note that going to https://ubuntu.com/security/notices.json without the offset will load the correct results.

Repro Steps:


Reported from: https://ubuntu.com/security/notices

seva-luchianov commented 1 week ago

After further poking at the website I found that ?offset=40 (page 5 as of writing this comment) and greater will start to return real results for https://ubuntu.com/security/notices

The results returned for ?offset=40 end at June 6th so this bug is still preventing users from accessing any notices between June 6th and June 17th

This behavior is not mirrored for https://ubuntu.com/security/notices.json which is still broken for any offset query string.

seva-luchianov commented 1 week ago

Looking at other issues this appears to coincide with the release of https://github.com/canonical/ubuntu-com-security-api/pull/152/

lizzochek commented 3 days ago

Hello @seva-luchianov. Thank you for filing an issue, it seems to be resolved and is currently not happening. If it keeps happening for you, please file a new issue.

seva-luchianov commented 3 days ago

I just tried navigating to https://ubuntu.com/security/notices.json?offset=20 and it's still returning a 503 error. How/when was this fixed? It's not working in a private window so it shouldn't be a cache/cookie issue. ubuntu.com.har.zip