Difference between revisions of "Issue:AddContribution missing prefix"
From FollowTheScore
Line 4: | Line 4: | ||
|Version = 1.5.0 | |Version = 1.5.0 | ||
|Description = addcontribution query uses raw "page" vs. prefixed page | |Description = addcontribution query uses raw "page" vs. prefixed page | ||
− | |Status = | + | |Status = closed |
}} | }} | ||
Latest revision as of 12:53, 28 October 2007
Description: | addcontribution query uses raw "page" vs. prefixed page |
Extension / Version: | DPL / 1.5.0 |
Type / Status: | Bug / closed |
Problem
addcontribution on a wiki that uses a table prefix results in:
The DPL extension (version 1.5.0) 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 `lw_page`.page_namespace as page_namespace, ... LEFT OUTER JOIN (`lw_categorylinks` AS cl_gc) ON (page_id=cl_gc.cl_from) ... ORDER BY sortkey ASC LIMIT 500
Error message is:
Unknown column 'page.page_id' in 'where clause' (localhost)
To fix:
Change line 2332 in DynamicPageList2.php from:
$sSqlWhere .= ' AND page_id=rc.rc_cur_id';
to:
$sSqlWhere .= ' AND ' . $sPageTable .'.page_id=rc.rc_cur_id';
Reply
Thanks, this will be fixed in the next version.
- Gero 23:59, 25 October 2007 (CEST)