Topic on Project:Support desk

Error when trying to watch pages

10
130.220.71.24 (talkcontribs)

I'm trying to setup a MediaWiki site and have been playing around with some of the features. I've been trying to get the Watch feature working, but everytime I click on the link in the tab I get the following message:

An error occurred while changing your watchlist settings for <page name>.

Would there be something in the configuration that is blocking this feature. Or if anyone has any pointers as to commonly made errors, it would be helpful.

130.220.71.24 (talkcontribs)

Hmmm I've just done a more in depth search... seems the problem is apart of the 1.18.1 release (which I have). Is there a patch for this currently or will I have to update (probably a more lengthy process that I have to handball off)

88.130.74.218 (talkcontribs)

Strange error, I have not seen that one before. But: I found a patch for it: See here. However, MediaWiki 1.18 is older and no longer supported. You could use MediaWiki 1.20 instead of 1.18. The patch, which I linked you is part of MediaWiki since version 1.19, so the problem will be solved with an upgrade to 1.20 as well.

I would recommend doing an update. See Upgrading for everything you need to know. :-)

130.220.71.25 (talkcontribs)

Okay, I've updated to 1.20 but for some reason watching still doesn't work, I click the watch link and this time nothing happens. The only way I can get watchlist to work is editing the raw watchlist. This will become a great hassle when I roll this out to my colleagues.

Interesting... right clicking the link and opening in a new window brings up the "do you want to add this page to your watchlist" And disabling AJAX also seems to get it working...

Still I'd rather have AJAX enabled so does anyone have any ideas?

Cavila (talkcontribs)

I have the same issue here: . Were you able to fix it or at least identify the code responsible for this?

Ciencia Al Poder (talkcontribs)

We need to reproduce the problem first, something that doesn't happen on the current version of MediaWiki.

If your wiki is public, a link to it will really help. As said on the forum thread you linked, it seems to be a conflicting JS error.

Are you using a custom skin?

RobinHood70 (talkcontribs)

I now have a reproducible case in which this occurs, at least on 1.19.3. I recently added the following lines to our LocalSettings.php:

$wgGroupPermissions['*'    ]['writeapi']        = false;
$wgGroupPermissions['user' ]['writeapi']        = false;
$wgGroupPermissions['bot'  ]['writeapi']        = true;

This caused the Watch/Unwatch feature to break, as documented in the OP, though editing the raw watchlist worked fine. Reverting the changes fixed the problem. My first suspicion is that there's an incorrect permissions check somewhere in the MediaWiki software.

RobinHood70 (talkcontribs)

I now have a reproducible case in which this occurs, at least on 1.19.3. I recently added the following lines to our LocalSettings.php:

$wgGroupPermissions['*'    ]['writeapi']        = false;
$wgGroupPermissions['user' ]['writeapi']        = false;
$wgGroupPermissions['bot'  ]['writeapi']        = true;

This caused the Watch/Unwatch feature to break, as documented in the OP, though editing the raw watchlist worked fine. Reverting the changes fixed the problem. My first suspicion is that there's an incorrect permissions check somewhere in the MediaWiki software.

Ciencia Al Poder (talkcontribs)

Well, that's the problem: The ajax watch feature is using the api to save the watch settings, so it requires the writeapi permission.

Apparently, if you click the watch tab and "open it in a new window/tab" it will work, without using the api.

This is tracked at bugzilla:47480

RobinHood70 (talkcontribs)

Yeah, I found that right after posting here and poked at it. It seems to have attracted some attention, and someone has offered to work on patching it.

Reply to "Error when trying to watch pages"