What is the problem?
When attempting to create a new global block, I got the response:
Via the API:
{ "error": { "globalblock": [ { "code": "globalblocking-block-failure", "message": "An error occurred while attempting to globally block ~2024-7017. Please try again." } ] } }
Via Special:GlobalBlock:
An error occurred while attempting to globally block ~2024-7017. Please try again.
It was against a temp account which had an expired global block. My test environment had a lot of expired global blocks so the prune that was triggered by the block request did not prune their block (the limit is 100). Therefore, I guess the INSERT IGNORE ... query did not insert a new row. It happened regardless of whether I set the modify parameter.
I guess this won't necessarily happen often, but when it does the error message is a bit cryptic and it is unclear how to fix it.
Steps to reproduce problem
- $wgUpdateRowsPerQuery = 1;
- Create two global blocks with a short expiry date (e.g. 10 seconds)
- Wait 10 seconds for the blocks to expire
- Create another global block against the last user you blocked in step 2
Expected behaviour: A new global block is created
Observed behaviour: Above error
Environment
Wiki(s): local docker GlobalBlocking – (5808f91) 17:49, 25 October 2024.