Last modified: 2007-05-03 06:09:36 UTC
"Cite this article" of older versions of an article does not work. Example: "Cite this article" of http://en.wikipedia.org/wiki/Citation gives: http://en.wikipedia.org/w/index.php?title=Special:Cite&page=Citation&id=85612375 if I open an older version of this article, for example http://en.wikipedia.org/w/index.php?title=Citation&oldid=80621275 then "Cite this article" still gives the reference to the current version, but should give: http://en.wikipedia.org/w/index.php?title=Special:Cite&page=Citation&id=80621275 This should work, otherwise somebody not knowing the wikipedia will have problems with correct citation of an older version of a wikpedia article Greetings, Schusch
(maybe another bug? just as information: i also had the problem some minutes ago, that i got as citation an old version id for a current article - the version was about one day old - with the article "castle" on en-WP. I got a citation of id=88043269, but the current id is (and was) 88314504. I did a refresh with my browser and got the current id - the id perhaps shouldn't be cached? Schusch)
*** Bug 9422 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of 9751 ***
*** Bug 9751 has been marked as a duplicate of this bug. ***
Created attachment 3558 [details] SkinTemplate patch for review Explanation / tech notes / summary: * $oldid is the literal oldid parameter from the GET string, and it can be misleading, such as when paging through results ( example: http://en.wikipedia.org/w/index.php?title=Public_inquiry&direction=prev&oldid=109148624 is not actually revision 109148624 at all) * The $revid parameter on the other hand is always equal to the most recent revision ID, and so it cannot be used for citations of old versions either. * Also the "permanent link" implementation currently avoids this whole problem by being greyed out when oldid is set, therefore you can't look to it for help either. * Instead, the attached uses the $wgArticle global, and just asks it what revision_id it thinks it has, and sets the $revid equal to that. * As a side-effect, this should also make "Permanent link" work / non-greyed-out when paging through the previous revisions (it's not available currently - example: http://en.wikipedia.org/w/index.php?title=Public_inquiry&direction=prev&oldid=127590344 ).
Created attachment 3559 [details] SkinTemplate patch for review, v2 Small update to the previous patch, which would die with this error: Fatal error: Call to a member function getId() on a non-object in includes/SkinTemplate.php on line 855 When attempting to view an image page: http://192.168.0.64/wiki/index.php?title=Image:Small-email.png The attached version does not have this problem.
The output/skin system already knows what id is being actually viewed in order to make its edit link properly. That information should thus be available to both the permalink (which should be showing, *not* grayed out) and Special:Cite plugin. If the wrong revision id number is being passed somewhere, perhaps that should be fixed?
Errr. ok that's what the patch does. Yay!
Created attachment 3565 [details] Alternate patch using $wgOut->mRevisionId The previous patch does not appear to work correctly for current revision views, as with the parser cache enabled the revision row is not actually loaded when not needed. This alternate patch uses the existing Skin/$wgOut-based revision ID record, and additionally sets it to the current revision for parser cache hits (where it was not previously needed, since it was only used to feed to parser objects to fill the {{REVISIONID}} variable.)
Looks good, applied in r21819. > patch uses the existing Skin/$wgOut-based revision ID record Only one-line addition to the above was to add the explicit declaration for $mRevisionId - without it, it was not obvious to me that Skin already knew the revision ID all along, but just in an undeclared data member. Marking as resolved.