Last modified: 2013-04-08 12:39:56 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 T27012, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25012 - When ordering by created date, there should be a method to show creation date beside the article like addfirstcategorydate does with cl_timestamp
When ordering by created date, there should be a method to show creation date...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
DynamicPageList (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://ta.wikinews.org
:
: 30852 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-01 11:36 UTC by Mohamed Mahir
Modified: 2013-04-08 12:39 UTC (History)
6 users (show)

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


Attachments

Description Mohamed Mahir 2010-09-01 11:36:36 UTC
<DynamicPageList>
category=published
category=Somalia
count=10
suppresserrors=true
ordermethod=created
addfirstcategorydate=true
</DynamicPageList>

The above code returns list of articles with date but whenever there is a change in the article it displays the last edited date along with the title. But We need to display  articles created date. Kindly help us to fix it.

Regards
Mohamed Mahir
Comment 1 Bawolff (Brian Wolff) 2010-09-01 19:59:03 UTC
Just as a note, traditionally (As in what enwikinews does) uses sorting by the date added to category published, not the create date.

The code you presented above should order them by create date, but show the date that the article was added to category:Published. There is currently no way to show the create date instead of date added to first category.

Do you have an example page where its showing last edit date instead of date added to category published?
Comment 2 Mohamed Mahir 2010-09-02 16:33:06 UTC
Thanks for your reply.

Yes we want published date.


Other active contributor tells, it happen whenever there is a change in the corresponding templates.

For example, we have a portal:somalia at http://ta.wikinews.org/wiki/வலைவாசல்:சோமாலியா

and we have templates:somalia at http://ta.wikinews.org/wiki/வார்ப்புரு:சோமாலியா

please see the dates for all the articles in the template are changed to 2nd september. But if u check the articles the actual date is different.

Please help us to fix.

Thanks
Mahir
Comment 3 Mohamed Mahir 2010-09-02 16:34:06 UTC
Thanks for your reply.

Yes we want published date.


Other active contributor tells, it happen whenever there is a change in the corresponding templates.

For example, we have a portal:somalia at http://ta.wikinews.org/wiki/வலைவாசல்:சோமாலியா

and we have templates:somalia at http://ta.wikinews.org/wiki/வார்ப்புரு:சோமாலியா

please see the dates for all the articles in the template are changed to 2nd september. But if u check the articles the actual date is different.

Please help us to fix.

Thanks
Mahir
Comment 4 Kanags 2010-09-03 03:00:21 UTC
For example, the following article was published on April 15, 2010, and modified yesterday.
http://ta.wikinews.org/wiki/சோமாலிய_வானொலிகளில்_பாடல்கள்_ஒலிபரப்புவதற்கு_போராளிகள்_தடை_விதிப்பு
The template shows this article as new.

Thanks for the help.
Regards
Kanags
Comment 5 Bawolff (Brian Wolff) 2010-09-22 20:50:31 UTC
Changing title to more specific (hopefully I captured that correctly)

I spent a little time investigating this, and there is actually two issues here, only one of which is DPL's fault:

Issue 1: ( no addcreatedate option )

When DynamicPageList uses order by creation date, it actually orders by page_id (on the assumption that page ids are sequential and don't get reused, which is mostly true). The bug is (as far as i understand) that there is no option to put the date created in front of each article that is output.

Currently the addfirstcategorydate parameter is used, which puts the date the article was added to the category being listed (cl_timestamp). This generally works, but occasionally doesn't.

For some reason, all the somolia articles on tawikinews seem to have a cl_timestamp of sometime in september 2nd, which is making the dates be wrong on the portal page. Which brings me to issue number 2:

-----

Issue 2 (probably to be split off into another bug as its not a DPL issue): cl_timestamp is being constantly updated (seemingly each time page is edited, including null edits but not including action=purge's) in ways it shouldn't be. (I'll probably file a seperate bug for this.

I really don't understand why that is. Its not like there is any {{DEFAULTSORT:{{REVISIONID}}}} in the text. I tested on enwikinews and this does not occur there.


Here's what a did to test this second issue.

*Took a random article from tawikinews: http://ta.wikinews.org/wiki/?curid=959 . This article was from a while ago and had a cl_timestamp for all of its categories as 9:07 october 23, 2009, presumably from the edit at the same time: http://ta.wikinews.org/w/index.php?action=historysubmit&diff=2406&oldid=2399

* This was the first weird thing, as based on the edit history, and that as far as i can tell none of these categories were from templates, the cl_timestamp should of been set in the edit at http://ta.wikinews.org/w/index.php?curid=959&diff=prev&oldid=2393 ( oct 22 2009 11:28).

*Then i did action=purge to see if that would affect anythng. It did not

*Then i did a null edit to see if that would change anything. Surprisingly it did. cl_timestamp of all the categories on that article changed to the current time! ( sept 22 2009 - http://ta.wikinews.org/w/api.php?action=query&clprop=timestamp&prop=categories&pageids=959 )

* I did another null edit to see if this was a one time thing (maybe the unicode normalization of tamil changed in the meanwhile and the sortkeys had to be updated or something weird like that), however yet again the cl_timestamp changed

Conclusion, on tawikinews every edit causes the cl_timestamp to be updated. Expected behaviour is they should only be updated on addition of category, removal of category, or change of sortkey.

This stumped me for a little while, and then i got thinking about the sortkey, and checked what it was. It turns out that it was not the full article title like i expected but only a portion of it (and ended in an invalid unicode sequence). Looking at the db, sortkey has a max size of 86, so mediawiki must have been seeing that the current sortkey doesn't = the stored sortkey, so updating the cl_timestamp, and then the sortkey gets truncated on insert (rinse and repeat each save)


Probably should of wrote that on a different bug report, but I figured this out as i was writing this. Will open another bug (assuming the issue still applies to trunk after all the categorylinks changes)


Tamil folks: as a work around you can add {{DEFAULTSORT:<first 80 bytes, which is about first 20 letters of page name>}} to new articles, and it may stop this from happening (it will update the timestamps when you add it though)
Comment 6 Bawolff (Brian Wolff) 2010-09-22 21:14:44 UTC
Note: issue 2 was split off into Bug 25254
Comment 7 Kanags 2010-10-02 11:36:12 UTC
Thanks Bawolff. I will try your DEFAULTSORT suggestion to the new articles.
Comment 8 Bugmeister Bot 2011-08-19 19:12:22 UTC
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Comment 9 Bawolff (Brian Wolff) 2011-09-11 19:25:00 UTC
*** Bug 30852 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