Last modified: 2013-07-25 07:05:41 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 T48523, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46523 - ordermethod=popularity causes sql error
ordermethod=popularity causes sql error
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
DynamicPageList (Other open bugs)
REL1_20-branch
All Linux
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-25 01:30 UTC by zoglun
Modified: 2013-07-25 07:05 UTC (History)
1 user (show)

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


Attachments

Description zoglun 2013-03-25 01:30:06 UTC
发生数据库查询语法错误。 可能是由于软件自身的错误所引起。 最后一次数据库查询指令是:

SELECT page_namespace,page_title FROM `page` WHERE page_namespace = '0' AND page_is_redirect = '0' ORDER BY c1.cl_timestamp DESC LIMIT 15

来自于函数“renderDynamicPageList”。 数据库返回错误“1054: Unknown column 'c1.cl_timestamp' in 'order clause' (localhost)”。


MediaWiki	1.20.3 (7759204)
PHP	5.4.9 (fpm-fcgi)
MySQL	5.5.28-debug

with DynamicPageList (Wikimedia) REL1_20 https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/intersection.git;a=snapshot;h=acbf96d2cae96586ff37ecba2c57f5d8e44a996f;sf=tgz
Comment 1 zoglun 2013-03-25 01:32:16 UTC
One error page example: http://wiki.moegirl.org/Help:DynamicPageList
Comment 2 Bawolff (Brian Wolff) 2013-03-25 01:41:46 UTC
Your database is broken... cl_timestamp was added as a field long ago.

Does making an api request for list=categorymembers sorting by date work
Comment 3 Bawolff (Brian Wolff) 2013-03-25 01:44:04 UTC
Sorry I skimmed the error because it was not in english. Nevermind this is dpl bug


What is dpl query that triggered this (what is page source)
Comment 4 zoglun 2013-03-25 01:46:54 UTC
<DynamicPageList>
namespace=main
ordermethod=popularity
count=15
</DynamicPageList>
Comment 5 zoglun 2013-03-25 01:48:50 UTC
Ha, I find out than when I turn the $wgDisableCounters false it works fine. Once I set the $wgDisableCounters to true; it show sql error.
Comment 6 Bawolff (Brian Wolff) 2013-03-25 01:52:21 UTC
Hmm maybe that ordermethod is broken and just no one noticed since most wikis have counters disabled.

Ill try and investigate more fully/fix the issue in the coming days
Comment 7 zoglun 2013-03-25 01:53:21 UTC
Well thank you!
Comment 8 Bawolff (Brian Wolff) 2013-03-27 11:30:18 UTC
Ok, so this turned out to be very embarrassing. Long ago I misspelled the word "category" in the code, which is what triggered this error.

Submitted Gerrit change #56124 to fix this. (Note this won't appear in the official downloads until someone else reviews it. To fix the issue on your wiki, just change line 305 of DynamicPageList.php from
  $orderMethod = 'categoyadd'; // default if hitcounter disabled.
to
 $orderMethod = 'categoryadd'; // default if hitcounter disabled.

(note the "r" in category).

Thank you for reporting this, and I apologize about my initial response in comment 2.
Comment 9 Andre Klapper 2013-04-11 15:27:23 UTC
Trivial patch in Gerrit (Gerrit change #56124), still awaiting review...
Comment 10 Gerrit Notification Bot 2013-05-07 20:29:21 UTC
Related URL: https://gerrit.wikimedia.org/r/62720 (Gerrit Change Ibc38d3a092e4cff3147f77f7cdb51ebc0ad54a0e)
Comment 11 Gerrit Notification Bot 2013-05-07 20:30:30 UTC
Related URL: https://gerrit.wikimedia.org/r/62721 (Gerrit Change Ibc38d3a092e4cff3147f77f7cdb51ebc0ad54a0e)
Comment 12 Bawolff (Brian Wolff) 2013-05-07 20:50:49 UTC
zoglun: This is fixed now. If you wait about an hour and redownload DynamicPageList, the issue should go away

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


Navigation
Links