-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fix most-read.json?_edition=EUR&dcr=true
endpoint
#9553
Comments
most-read.json?_edition=EUR&dcr=true
most-read.json?_edition=EUR&dcr=true
endpoint
Original post from Mariot: |
The issuehttps://api.nextgen.guardianapps.co.uk/most-read.json?_edition=EUR&dcr=true endpoint gives a 404 although it seems possible from the DCR code that it can be hit. Why is this happening?
The CAPI query frontend is making for Europe content is: Because the Europe id is EUR. This query does not redirect and returns an empty array, hence the cache is empty for key EUR Query parameter should be edition=EUROPE instead of edition=EUR: Fixing the query for the Europe edition content populates the agent with content and fixes this endpoint. See for a draft solution: What happens currently with the Most Viewed container for articles in the Europe edition?It seems to be working fine because all articles have a |
We noticed that the same issue exists for the International edition. The entry in the cache is empty because frontend is using query parameter edition=INT instead of the correct edition=INTERNATIONAL CAPI returns an empty list. CAPI returns content. Draft PR: 26830 that fixes the issue. We need to double check with the CAPI team if this is an appropriate solution. |
It is currently broken. It can be hit in the following edge case: A reader
dotcom-rendering/dotcom-rendering/src/components/MostViewedFooterData.importable.tsx
Lines 31 to 33 in 2ef128c
We haven't found an article yet that does not have a section so this is not likely to affect many readers.
The text was updated successfully, but these errors were encountered: