Steps to replicate the issue
- Have a wiki on MediaWiki 1.35 (an LTS version) with AbuseFilter installed and Special:AbuseLog displaying entries for various filters
- Upgrade to MediaWiki 1.39 (next LTS version) and run update.php
What happens?:
Special:AbuseLog now displays all entries referencing filter 0. Clicking on "examine" will throw an error: MediaWiki\Extension\AbuseFilter\Filter\FilterNotFoundException: Filter 0 does not exist
What should have happened instead?:
Special:AbuseLog should work correctly.
Software version 1.39
Other information
The abuse_filter_log table was storing the related abuse filter id on the afl_filter, but now it stores it on the afl_filter_id. See change https://gerrit.wikimedia.org/r/c/mediawiki/extensions/AbuseFilter/+/459818/ - REL1_36
The data should be migrated with the maintenance/migrateAflFilter.php script.
However, this script was deleted in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/AbuseFilter/+/723659 - REL1_38 - Only 2 versions after it was introduced, and both between the same LTS versions. This violates the Compatibility policy for upgrades