Last modified: 2010-05-15 15:33:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 1879 - when newtalk is cleared, invalidate the cache immediately
when newtalk is cleared, invalidate the cache immediately
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.4.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-12 22:48 UTC by T. Gries
Modified: 2010-05-15 15:33 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description T. Gries 2005-04-12 22:48:42 UTC
I noticed, that the newtalk flag is not always cleared. 
 
A tiny patch (reordering and calling savesettings) in User.php solves this. 
 
... 
	function setNewtalk( $val ) { 
		$this->loadFromDatabase(); 
		$this->mNewtalk = $val; 
		$this->mTouched = wfTimestampNow(); # invalidate cache directly here 
		$this->saveSettings(); # immediately savesettings; finished 
	} 
....
Comment 1 JeLuF 2005-04-15 14:53:37 UTC
There's only one function calling User::setNewtalk(). This is the code:

                if ( 0 == strcmp( $this->mTitle, $wgUser->getName() ) ) {
                        $wgUser->setNewtalk( 0 );
                        $wgUser->saveSettings();
                } else {

I don't see that calling saveSettings() within setNewtalk() would help a lot.
Comment 2 T. Gries 2005-04-15 18:10:59 UTC
JeLuF,

I ***reopened the bugzilla*** and explain thoroughly:

WITHOUT my patch, the mediawiki versions < REL1_4 have this bug:

Assume you are User X and logged-in as X.
Edit the User_talk page of User Y.

Now logout and re-login as User Y
"You have new messages" is shown 
!! DO NOT VISIT User_talk:Y page until I say so

Click on recent changes.
Click onto Main_page (WikiLogo)
Then goto User_talk:Y page / remark: the "you have new messages" marker is
suppressed, when you visit your user_talk page, so you do no know if it is
cleared or not/

This visiting step _should_ clear the marker, but you cannot see it, because the
display is suppressed as explained.

Now click again onto Recent Changes
........ and, surprise, surprise, the wiki shows again the marker "You have new
messages", despite the fact that you just visited the user_talk page.


=======> My patch solves this problem.
=======> Please don't too quickly disregard my whole work, which others find
invaluable.




Try my patch please.
Comment 3 T. Gries 2005-04-15 18:23:34 UTC
JeLuf, 

you are right w.r.t. to the locations of the "savesettings" call.

Please allow me to further investigate, what really happens here (the
non-clearing of the new message flag is a cache problem) and then I will close
this bug.

Okay ?

Comment 4 JeLuF 2005-04-15 18:29:39 UTC
Tested with current 1.4 CVS, can't reproduce the described behaviour.
Comment 5 T. Gries 2005-04-15 18:41:56 UTC
Browser ?
Comment 6 JeLuF 2005-04-15 18:43:43 UTC
How is server side DB entry change browser related?

FireFox 1.0, MacOS X
Comment 7 T. Gries 2005-04-15 18:50:34 UTC
JeLuF:

I reverted my patch and could not reproduce the problem (now) with NETSCAPE 7.1
I fully agree with closing the bugzilla now.

There is a problem somewhere and I am going to find it (later), but it appears
to be browsercache related.

Closing ok.

(When I have new information, I will reopen this bugzilla)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links