Issue:AddContribution missing prefix

From FollowTheScore
Revision as of 19:32, 24 October 2007 by Hsolbrig (talk | contribs) (New page: {{Issue |Type = Bug | Change Request <-- please select |Extension = DPL | Wgraph | aiSee | Call <-- please select |Version = 1.5.0 |Description = addcontribution query u...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Description: addcontribution query uses raw "page" vs. prefixed page
Extension / Version: DPL   /   1.5.0
Type / Status: Bug   /   open

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