PX Forums demoYou are browsing as a visitor. Try it as: Member · Moderator · AdminOne click, no password. All changes are reset every night at 03:45 CET.
Skip to content

API returns 500 when "limit" is 0

Bug Reports Solved Locked
Log in
Replies
7
Voices
8
Views
392
Last activity
Score 3
Tomáš Novák Topic starter Moderator697 karma44 posts · Joined Dec 2026

GET /api/v1/pages?limit=0 returns a server error instead of an empty list or a validation message.

Choose a reaction

7 answers

Score 7
Daniel Reyes Expert876 karma52 posts · Joined Dec 2026
Solution

Reproduced. The validator allowed 0 but the pager divided by it. Fixed in the next patch: values below 1 are now rejected with a 422 and a message. In the meantime use limit=1.

Choose a reaction
  • Worked, but I had to log out and back in first.

    – Tomáš Novák
Score 2
Sofia Ricci Helper759 karma59 posts · Joined Dec 2026

Tested on a fresh VPS: not reproducible. Maybe related to a plugin? Which ones do you run?

Choose a reaction
Score 1
Ivan Kovač Member207 karma37 posts · Joined Dec 2026

@demo-chloe ↗:

Workaround until it is fixed: clear the cache after saving.

Same behaviour here. It started after the 2.4 update.

Choose a reaction
Score 0
Sam O'Connor Member114 karma32 posts · Joined Dec 2026

I opened an internal ticket for this. Will update this topic when there is a fix.

Choose a reaction
Score 0
Lucas Meyer Expert852 karma57 posts · Joined Dec 2026

Fix is merged for the next patch release. Thanks for the quick report!

Choose a reaction
Score 0
Chloé Martin Helper159 karma33 posts · Joined Dec 2026

Workaround until it is fixed: clear the cache after saving.

Choose a reaction
Score 0
Maya Okonkwo Moderator540 karma57 posts · Joined Dec 2026

Thanks for the report. I could reproduce it with a clean install and the default theme.

Choose a reaction

This topic is locked. New replies are closed.

Back to Bug Reports