When pages are moved (log_action="move" AND log_type="move"), the log_page field in the logging table contains the page_id of the *redirect page* that was created or zero if no redirect was created.
This is painful and counter-intuitive. I expected log_page to contain the page_id of the *moved page*.
Proposed solution:
Store the page_id of the *moved page* in log_page for future moves and store the page_id of the newly created redirect in the serialized array stored in log_params.
Potential issues:
This may cause backwards compatibility issues if someone is relying on the redirect page_id appearing in log_page for a page move.
Version: 1.23.0
Severity: minor
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=57079
https://bugzilla.wikimedia.org/show_bug.cgi?id=68930