Last modified: 2013-04-16 22:59:40 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 T46571, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44571 - addcontributions:; table name prefix leads to invalid SQL statement
addcontributions:; table name prefix leads to invalid SQL statement
Status: UNCONFIRMED
Product: MediaWiki extensions
Classification: Unclassified
DynamicPageList2 (Other open bugs)
unspecified
All All
: High critical (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-01 08:43 UTC by Ernie
Modified: 2013-04-16 22:59 UTC (History)
1 user (show)

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


Attachments

Description Ernie 2013-02-01 08:43:28 UTC
Using addcontributors leads to the following SQL error:

The DPL extension (version 2.01) produced a SQL statement which lead to a Database error.
The reason may be an internal error of DPL or an error which you made,
especially when using DPL options like titleregexp.
Query text is:
SELECT DISTINCT `cdam_page`.page_namespace AS page_namespace,`cdam_page`.page_title AS page_title,`cdam_page`.page_id AS page_id, SUM( ABS( rc.rc_new_len - rc.rc_old_len ) ) AS contribution, rc.rc_user_text AS contributor, `cdam_page`.page_title as sortkey FROM `cdam_recentchanges` AS rc, `cdam_page` INNER JOIN `cdam_categorylinks` AS cl0 ON `cdam_page`.page_id=cl0.cl_from AND (cl0.cl_to='DF') INNER JOIN `cdam_categorylinks` AS cl1 ON `cdam_page`.page_id=cl1.cl_from AND (cl1.cl_to='Developer') WHERE 1=1 AND page.page_id=rc.rc_cur_id AND `cdam_page`.page_is_redirect=0 GROUP BY rc.rc_cur_id ORDER BY page_title ASC LIMIT 0, 500

Error message is:
Unknown column 'page.page_id' in 'where clause' (localhost)

The error is located in line 2136 of DPLMain.php:

            $sSqlWhere   .= ' AND page.page_id=rc.rc_cur_id';

This line should be changed to:

            $sSqlWhere   .= ' AND '.$sPageTable.'.page_id=rc.rc_cur_id';

The original statement refers directly to the 'page' table, which does not exist in cases where a database prefix is used.
Comment 1 Andre Klapper 2013-04-16 08:26:07 UTC
I assume this refers to http://www.mediawiki.org/wiki/Extension:DynamicPageList_%28third-party%29 so putting it back to DynamicPageList2. Sorry, got misled by http://www.mediawiki.org/wiki/Extension:DynamicPageList2
Comment 2 Bawolff (Brian Wolff) 2013-04-16 22:59:40 UTC
(In reply to comment #1)
> I assume this refers to
> http://www.mediawiki.org/wiki/Extension:DynamicPageList_%28third-party%29 so
> putting it back to DynamicPageList2. Sorry, got misled by
> http://www.mediawiki.org/wiki/Extension:DynamicPageList2

Yes that's correct. I know its confusing beyond belief

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


Navigation
Links