Author: d.keith.d
Description:
As the summary states, newtalk notifications do not go away even after a user views their talk page. This problem did not occur until upgrading from MW 1.21 to 1.22rc2.
-----BEGIN SPELUNKING-----
Looking at the user_newtalk table, the most recent entries seem to consistently have actual timestamps in the user_last_timestamp column, rather than earlier entries, which were either NULL or blank for that column.
It seems that the message will always display if that user's ID is present in the user_newtalk table, regardless of the value in user_last_timestamp. Manually altering the table's contents supports this.
Comparing code in includes/User.php for 1.21 and 1.22rc2, getNewMessageRevisionId() was added. getNewMessageRevisionId() only seems to be used in includes/OutputPage.php to set $vars['wgUserNewMsgRevisionId']. This was just a cursory glance at the codebase, and nothing immediately jumped out at me as the cause of the problem.
-----END SPELUNKING-----
To reproduce:
- User A writes a new message on User B's talk page.
- User B should now see the orange new messages notification on every page, even after checking their talk page (either manually or via the links provided in the notification).
To resolve the ugly way:
- Find user ID of affected user.
- Log into MySQL console.
- DELETE FROM tableprefix_user_newtalk WHERE user_id=<affected user ID>;
Current setup:
MediaWiki 1.22.0rc2
nginx 1.5.7
php-fpm 5.4.22
memcached 1.4.13
MariaDB 5.5.32
Gentoo Linux
Version: 1.22.0
Severity: minor