Last modified: 2014-10-28 20:42:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31585, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29585 - maintenance script edit.php doesn't update link tables properly (seen when user has "Auto-number headings" set)
maintenance script edit.php doesn't update link tables properly (seen when us...
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.17.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 29518 72594 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-25 16:55 UTC by VictorPorton
Modified: 2014-10-28 20:42 UTC (History)
4 users (show)

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


Attachments

Description VictorPorton 2011-06-25 16:55:48 UTC
I created this page:

http://www.withoutvowels.org/wiki/Hebrew:%D7%91%D7%A8%D7%90%D7%A9%D7%99%D7%AA

Nevertheless a link to that page at http://www.withoutvowels.org/wiki/Tanakh:Genesis_1:1 is shown as a link to an not existing page.

This is a bug.

Maybe it is related with namespaces and page protection? See a fragment of my LocalSettings.php:


define("NS_HEBREW", 100);
define("NS_HEBREW_TALK", 101);
define("NS_TANAKH", 102);
define("NS_TANAKH_TALK", 103);
define("NS_EXEGESIS", 104);
define("NS_EXEGESIS_TALK", 105);
 
$wgExtraNamespaces[NS_HEBREW] = "Hebrew";
$wgExtraNamespaces[NS_HEBREW_TALK] = "Hebrew_talk";   # underscore required
$wgExtraNamespaces[NS_TANAKH] = "Tanakh";
$wgExtraNamespaces[NS_TANAKH_TALK] = "Tanakh_talk";   # underscore required
$wgExtraNamespaces[NS_EXEGESIS] = "Exegesis";
$wgExtraNamespaces[NS_EXEGESIS_TALK] = "Exegesis_talk";   # underscore required

#$wgNamespaceProtection[NS_HEBREW] = array( 'nobody' ); #permission "editfoo" required to edit the foo namespace
#$wgNamespacesWithSubpages[NS_HEBREW_TALK] = true;            #subpages enabled for the foo namespace
#$wgGroupPermissions['sysop']['editfoo'] = true;      #permission "editfoo" granted to users in the "sysop" group

$wgNamespaceProtection[NS_TANAKH] = array( 'nobodyallowed' );
#$wgNamespacesWithSubpages[NS_TANAKH] = true;            #subpages enabled for the foo namespace
$wgNamespacesWithSubpages[NS_TANAKH_TALK] = true;            #subpages enabled for the foo namespace
#$wgGroupPermissions['sysop']['editfoo'] = true;      #permission "editfoo" granted to users in the "sysop" group

$wgNamespacesWithSubpages[NS_EXEGESIS] = true;            #subpages enabled for the foo namespace
$wgNamespacesWithSubpages[NS_EXEGESIS_TALK] = true;            #subpages enabled for the foo namespace
#$wgGroupPermissions['sysop']['editfoo'] = true;      #permission "editfoo" granted to users in the "sysop" group
Comment 1 Sam Reed (reedy) 2011-06-25 16:59:26 UTC
They are 2 different namespaces
Comment 2 VictorPorton 2011-06-25 17:00:53 UTC
"They are 2 different namespaces."

I haven't understood what you speak about. Certainly there are a few different namespaces on my site. How is it related with the bug I reported?
Comment 3 VictorPorton 2011-06-25 17:07:01 UTC
Weirdly, it was marked as existing pages after some time passed and I pressed F5.

Should I disable page cache?
Comment 4 Sam Reed (reedy) 2011-06-25 17:11:32 UTC
(In reply to comment #2)
> "They are 2 different namespaces."
> 
> I haven't understood what you speak about. Certainly there are a few different
> namespaces on my site. How is it related with the bug I reported?

Sorry, meant to delete that.

I wouldn't disable page cache, it sounds like a job queue type issue
Comment 5 VictorPorton 2011-06-25 17:19:35 UTC
Which job queue type issue? My site is not yet heavily loaded. Hm, maybe Google indexing it overloaded the job queue?
Comment 6 Bawolff (Brian Wolff) 2011-06-25 22:24:43 UTC
(In reply to comment #5)
> Which job queue type issue? My site is not yet heavily loaded. Hm, maybe Google
> indexing it overloaded the job queue?

What? Google indexing will not cause the job queue to become backed up (It could however have the opposite effect, but really in all probability, google doesn't index you enough for it to matter at all). 

In any case, according to http://www.withoutvowels.org/w/api.php?action=query&meta=siteinfo&siprop=statistics&format=yamlfm the job queue has (approximately) nothing in it, which means that jobs are being executed normally as they should.

However, what's more concerning is that the page in question has no backlinks, ( http://www.withoutvowels.org/wiki/Special:WhatLinksHere/Hebrew:%D7%91%D7%A8%D7%90%D7%A9%D7%99%D7%AA ) which is probably where your issue is coming up (MediaWiki doesn't realize the page is linking to it, so it doesn't know to fix the link).
This is probably something broken with the import process.

Which maintenance script did you use to import pages? In the mean time, running the refreshLinks.php maintenance script will probably fix the issue.
Comment 7 VictorPorton 2011-06-25 22:40:03 UTC
Running the refreshLinks.php maintenance script does not help with
http://www.withoutvowels.org/wiki/Special:WhatLinksHere/Hebrew:%D7%91%D7%A8%D7%90%D7%A9%D7%99%D7%AA
which remained empty after running refreshLinks.php.

I did page import of Tanakh:* namespace with edit.php.

So why my the list of links to Hebrew:%D7%91%D7%A8%D7%90%D7%A9%D7%99%D7%AA is empty? It's wrong.
Comment 8 Bawolff (Brian Wolff) 2011-06-25 23:02:23 UTC
Could you make some sort of edit (using normal web interface) to Tanakh:Genesis_1:1, and see if that affects the whatlinkshere pages of those other pages (an edit will force refresh of all links tables, which will help narrow down the problem)
Comment 9 VictorPorton 2011-06-25 23:44:14 UTC
Tanakh:Genesis_1:1 is in the namespace Tanakh: which I forbidden to be edited by any user (It can be edited only by maintenance scripts.)
Comment 10 Bawolff (Brian Wolff) 2011-06-26 01:26:21 UTC
(In reply to comment #9)
> Tanakh:Genesis_1:1 is in the namespace Tanakh: which I forbidden to be edited
> by any user (It can be edited only by maintenance scripts.)

Yes i know. If you temp remove the restriction, make an edit to that page, and see if the whatlinkshere are fixed, it would help narrow down where the problem is.


On my local install, edit.php script correctly populates link tables as expected (even if using similar namespace protection configuration).
Comment 11 VictorPorton 2011-06-26 13:19:41 UTC
I added the permission to edit Tanakh: namespace for the user Admin. I edited http://www.withoutvowels.org/wiki/Tanakh:Genesis_1:1 and after this backlinks at http://www.withoutvowels.org/wiki/Special:WhatLinksHere/Hebrew:%D7%91%D7%A8%D7%90%D7%A9%D7%99%D7%AA work OK.

Can I now revert it and remove the permission to edit?
Comment 12 Bawolff (Brian Wolff) 2011-06-27 00:09:54 UTC
>Can I now revert it and remove the permission to edit?

Sure. Null edits fix the links table, which means it just didn't work originally for some reason.

I'm really unsure why refreshLinks.php (or edit.php for that matter) didn't populate the links table.
Comment 13 VictorPorton 2011-06-27 20:39:10 UTC
I created for test this page: http://www.withoutvowels.org/wiki/Hebrew:%D7%90%D7%9C%D7%94%D7%99%D7%9D

On http://www.withoutvowels.org/wiki/Tanakh:Genesis_1:1 it is properly shown that now this link is existing.

Also http://www.withoutvowels.org/wiki/Special:WhatLinksHere/Hebrew:%D7%90%D7%9C%D7%94%D7%99%D7%9D works as it should.

It seems for me that the bug may appear after editing tens of thousands pages with maintenance/edit.php
Comment 14 VictorPorton 2011-06-27 21:06:30 UTC
You've written "maintenance script edit.php doesn't update link tables properly (sometimes)", but originally I posted the bug report that a link on a page created by edit.php was not marked as existing after I manually created a new page whose target the link is. (I recall that it was marked as existing after some period of time.)
Comment 15 Bawolff (Brian Wolff) 2011-06-27 22:14:49 UTC
(In reply to comment #14)
> You've written "maintenance script edit.php doesn't update link tables properly
> (sometimes)", but originally I posted the bug report that a link on a page
> created by edit.php was not marked as existing after I manually created a new
> page whose target the link is. (I recall that it was marked as existing after
> some period of time.)

At the moment I believe that's a symptom of the link tables not being updated (If MediaWiki didn't know that page linked there, it didn't know to change the link colour when you created the new page). It probably fixed itself later due to the cache getting purged for some other reason
Comment 16 Bawolff (Brian Wolff) 2011-06-28 23:26:34 UTC
*** Bug 29518 has been marked as a duplicate of this bug. ***
Comment 17 Tim Starling 2011-06-28 23:33:21 UTC
It looks like there's no commit in Article::doEdit() after the wfDoUpdates() call, and edit.php doesn't commit either, it just calls exit(0);
Comment 18 Bawolff (Brian Wolff) 2011-07-06 01:12:09 UTC
There's no $dbw->begin() either though. I always thought changes took affect immediately if there isn't a $dbw->begin()
Comment 19 VictorPorton 2011-12-02 18:37:15 UTC
I noticed one more "feature": It looks as it should from an admin account, but wrong from a normal user account. :-(
Comment 20 VictorPorton 2011-12-02 18:46:04 UTC
After editing http://www.withoutvowels.org/wiki/Hebrew:%D7%95%D7%94%D7%90%D7%A8%D7%A5 the link to this page from http://www.withoutvowels.org/wiki/Tanakh:Genesis_1:2 looks like a link to an nonexistent page (despite of it exists).

But it has wrong looks only from a normal user. It works as it should from an admin user.

It is a bug. What to do?
Comment 21 VictorPorton 2011-12-02 18:49:41 UTC
(In reply to comment #20)
> After editing
> http://www.withoutvowels.org/wiki/Hebrew:%D7%95%D7%94%D7%90%D7%A8%D7%A5 the
> link to this page from http://www.withoutvowels.org/wiki/Tanakh:Genesis_1:2
> looks like a link to an nonexistent page (despite of it exists).
> 
> But it has wrong looks only from a normal user. It works as it should from an
> admin user.
> 
> It is a bug. What to do?

I've seen it from an other (non-admin) user also. It works. It just doesn't work from the user I use to normally browse the site. :-(
Comment 22 Bawolff (Brian Wolff) 2011-12-02 18:53:32 UTC
>It works as it should from an admin user.

Most likely the admin user has different preferences enabled (being an admin in and of itself shouldn't change anything). Since this is a caching issue, and mediawiki keeps different copies of the cache based on which preferences you have enabled (for some of them), the admin just sees a different cached version then a normal user.
Comment 23 VictorPorton 2011-12-02 18:54:37 UTC
(In reply to comment #22)
> >It works as it should from an admin user.
> 
> Most likely the admin user has different preferences enabled (being an admin in
> and of itself shouldn't change anything). Since this is a caching issue, and
> mediawiki keeps different copies of the cache based on which preferences you
> have enabled (for some of them), the admin just sees a different cached version
> then a normal user.

And how to update all caches?
Comment 24 Bawolff (Brian Wolff) 2011-12-02 18:56:19 UTC
Its already been discussed above - refreshLinks.php
Comment 25 VictorPorton 2011-12-02 18:57:40 UTC
(In reply to comment #24)
> Its already been discussed above - refreshLinks.php

And I've already said that refreshLinks.php does not help.
Comment 26 VictorPorton 2011-12-02 19:29:20 UTC
I unchecked "Format broken links like this (alternative: like this?)" in user's preferences and have clicked "Save" button. After this (and pressing F5) formatting of links haven't changed for this user.

I will create a new user and try to configure it anew, as a bug workaround.
Comment 27 VictorPorton 2011-12-02 19:29:58 UTC
(In reply to comment #26)
> I unchecked "Format broken links like this (alternative: like this?)" in user's
> preferences and have clicked "Save" button. After this (and pressing F5)
> formatting of links haven't changed for this user.
> 
> I will create a new user and try to configure it anew, as a bug workaround.

Maybe it is caused by me used "Rename user" module?
Comment 28 VictorPorton 2011-12-02 21:20:53 UTC
Finally I found that this bug spots when "Auto-number headings" option in user preferences is on.

What could be the reason of it?
Comment 29 Bawolff (Brian Wolff) 2013-08-19 17:30:16 UTC
I'm closing this worksforme. Sorry, there's just nothing I can do if I can't make the bug happen to me.
Comment 30 Bawolff (Brian Wolff) 2014-10-28 20:42:59 UTC
*** Bug 72594 has been marked as a duplicate of this bug. ***

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


Navigation
Links