Last modified: 2014-01-08 16:47:25 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 T25002, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23002 - imagelinks table not updated after imagemove
imagelinks table not updated after imagemove
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Bryan Tong Minh
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-30 11:58 UTC by Derk-Jan Hartman
Modified: 2014-01-08 16:47 UTC (History)
5 users (show)

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


Attachments
Update the pages in imagelinks after file move (505 bytes, patch)
2010-04-30 14:42 UTC, Derk-Jan Hartman
Details
update imagelinks to new target (657 bytes, patch)
2010-04-30 16:01 UTC, Derk-Jan Hartman
Details

Description Derk-Jan Hartman 2010-03-30 11:58:54 UTC
After moving an image, the imagelinks table is not updated straight away. This leads to people nominating images for deletion because they are no longer in use, simply because they were recently moved.
Comment 1 Derk-Jan Hartman 2010-03-30 12:06:37 UTC
See also Bug 17259
Comment 2 Derk-Jan Hartman 2010-04-30 14:42:50 UTC
Created attachment 7341 [details]
Update the pages in imagelinks after file move

I hope I interpreted the process correctly. I think this patch should put the titles of pages that link to the old filename title on the update queue....
Comment 3 Derk-Jan Hartman 2010-04-30 14:56:35 UTC
We could separate the behavior depending on wether or not a redirect is left behind. If a redirect is left behind, we could just rewrite the database table in one go i guess (a bit like the watchlist entries). This would have the benefit of the new filepage being immediately up to date. 

(We do need the HTMLCache update when no redirect is left behind, because missing images have different HTML than present images of course.
Comment 4 Derk-Jan Hartman 2010-04-30 16:01:51 UTC
Created attachment 7342 [details]
update imagelinks to new target

Implemented direct update of the imagelinks table.
Comment 5 Derk-Jan Hartman 2010-05-04 19:02:42 UTC
A direct update consumes to much resources, so it should be batched.

Note that the parser puts the DBkey of the redirect in the imagelinks table, instead of the target image. This should probably be fixed first.

Plan:
In ParserOutput addImage() function resolve the DBkey to an article and follow the redirect if needed, store DBkey() of target ? Can redirects only be resolved for Articles or also for Titles ?
Comment 6 Bryan Tong Minh 2011-02-12 23:09:30 UTC
How do we handle pagelinks for normal page moves?
Comment 7 Roan Kattouw 2011-05-13 13:10:21 UTC
(In reply to comment #6)
> How do we handle pagelinks for normal page moves?
We just keep it pointing to the redirect, I believe.
Comment 8 Bryan Tong Minh 2011-05-14 09:37:06 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > How do we handle pagelinks for normal page moves?
> We just keep it pointing to the redirect, I believe.

I just confirmed this behaviour on trunk. It currently is thus consistent.

The fix for this problem would be show also redirects on the "the following pages link to this file".
Comment 9 Bryan Tong Minh 2011-05-14 09:49:32 UTC
On the other hand, new imagelinks will point to *both* the redirect and the redirect target. It should only point to the redirect.
Comment 10 Bryan Tong Minh 2011-05-14 12:21:58 UTC
Fixed in r88054.
Comment 11 Brad Jorsch 2012-01-30 01:08:33 UTC
Is this really fixed in r88054? It seems the redirect created during page move doesn't get its imagelinks entry properly created until r107636 (although prior to r107636, a null edit to the redirect will fix it).

So it's still fixed, although the fix isn't completely live in 1.18wmf1 yet.
Comment 12 Gerrit Notification Bot 2014-01-06 21:31:03 UTC
Change 105830 had a related patch set uploaded by Anomie:
Make imagelinks work like templatelinks

https://gerrit.wikimedia.org/r/105830
Comment 13 Gerrit Notification Bot 2014-01-07 23:17:47 UTC
Change 105830 merged by jenkins-bot:
Make imagelinks work like templatelinks

https://gerrit.wikimedia.org/r/105830
Comment 14 Brad Jorsch 2014-01-08 16:47:25 UTC
Starting with 1.23wmf10, imagelinks updating on moves and deletions should be more reliable.

See https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.

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


Navigation
Links