Last modified: 2011-11-22 08:31:15 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 T27754, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25754 - Populate rc_cur_id aswell on upload event
Populate rc_cur_id aswell on upload event
Status: NEW
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.17.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-02 17:23 UTC by Krinkle
Modified: 2011-11-22 08:31 UTC (History)
5 users (show)

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


Attachments

Description Krinkle 2010-11-02 17:23:03 UTC
Currently the rc_cur_id is not being populated, nor is there a old_id filled.

This makes it impossible tricky to properly work with uploads. On the toolserver and in extensions, listing recent uploads is complicated as the file could've been renamed in the mean time and the redirect deleted.
In order to build a working link from the recent changes with normal edits I use rc_cur_id and the link-format <a href="/w/index.php?curid= (rc_cur_id)">(namespaces[rc_namespace]) . rc_title</a>

But with uploads this fails. A join to the page table is posible to retrieve the page id but that's a bit expensive to just get an id.

And if the redirect is deleted it's no longer in the page table either and the entry in the recentchangges table is basically a ghost. And no other working entry for that upload action is to be found.
Comment 1 Ariel T. Glenn 2011-11-21 18:49:52 UTC
http://commons.wikimedia.org/w/api.php?action=query&list=recentchanges&rclimit=5000&rcprop=comment|title|ids|timestamp|loginfo&rctype=log

A quick grep shows that the entries that now have rc_cur_id filled in are all generated by Flickr upload bot... yay for the bot but it would be nice if we got regular entries fixed up too.  

Here's a specific image with just one revision and except for rc it looks normal:

http://commons.wikimedia.org/w/index.php?title=File:Gunther_Von-Bultzingslowen-met-het-.jpg&action=history

but here's the rc entry, rc_cur_id = 0.

<rc type="log" ns="6" title="File:Gunther Von-Bultzingslowen-met-het-.jpg" rcid="64034030" pageid="0" revid="0" old_revid="0" timestamp="2011-11-21T18:13:12Z" comment="{{Informa... <snipped for the bug report> " logid="31812295" logtype="upload" logaction="upload">
Comment 2 Bryan Tong Minh 2011-11-22 08:31:15 UTC
(In reply to comment #1)
> http://commons.wikimedia.org/w/api.php?action=query&list=recentchanges&rclimit=5000&rcprop=comment|title|ids|timestamp|loginfo&rctype=log
> 
> A quick grep shows that the entries that now have rc_cur_id filled in are all
> generated by Flickr upload bot... yay for the bot but it would be nice if we
> got regular entries fixed up too.  
> 
Ariel, that is because of the way the uploading process works: first the users creates a page in the File: namespace, and then the bot uploads an image to that page. So essentially the file already has a page id when the file is being uploaded.

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


Navigation
Links