What is the problem?
If $wgCheckUserEventTablesMigrationStage contains SCHEMA_COMPAT_READ_NEW, when viewing the log entry for a global block in Special:CheckUser, I see warnings of the form:
Notice: unserialize(): Error at offset 0 of n bytes in /var/www/html/w/includes/logging/LogEntryBase.php on line 70
The log entry does not display the block params, instead just displaying ()
In the logging table, global block stores a string in the log_params column, rather than a json(?) object. For example,
+----------+------------+----------------------------------------------+ | log_type | log_action | log_params | +----------+------------+----------------------------------------------+ | gblblock | gblock2 | anonymous only, no expiration set 3.1.1.1/32 | +----------+------------+----------------------------------------------+
Steps to reproduce problem
- Install the CheckUser and GlobalBlocking extensions (instructions for docker for CheckUser and GlobalBlocking)
- Add this to your LocalSettings.php: $wgCheckUserEventTablesMigrationStage = SCHEMA_COMPAT_WRITE_OLD | SCHEMA_COMPAT_WRITE_NEW | SCHEMA_COMPAT_READ_NEW;
- Login as an admin, go to Special:GlobalBlock and block any IP address
- Go to Special:CheckUser, enter your admin username, check "get edits" and submit
Expected behavior: You should see an entry of the form <admin> globally blocked User:<ip> (no expiration set) or <admin> globally blocked User:<ip> (expiration 13:22, 27 September 2023)
Observed behavior: At the top of the page you will see warnings like in the description. The log entry will be something like <admin> globally blocked User:<ip> ()
Environment
Wiki(s): local docker CheckUser 2.5 (b31ab64) 16:50, 25 September 2023.
Screenshots
Read old:
Read new: