Difference between revisions of "Issue:AddContribution missing prefix"

From FollowTheScore
Jump to: navigation, search
(New page: {{Issue |Type = Bug | Change Request <-- please select |Extension = DPL | Wgraph | aiSee | Call <-- please select |Version = 1.5.0 |Description = addcontribution query u...)
 
 
(2 intermediate revisions by 2 users not shown)
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      = open
+
  |Status      = closed
 
}}
 
}}
  
 
== Problem ==
 
== Problem ==
 
addcontribution on a wiki that uses a table prefix results in:
 
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 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,
 
The reason may be an internal error of DPL or an error which you made,
 
especially when using DPL options like titleregexp.
 
especially when using DPL options like titleregexp.
 +
 
Query text is:
 
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
+
 
 +
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:
 
Error message is:
Unknown column 'page.page_id' in 'where clause' (localhost)  
+
Unknown column 'page.page_id' in 'where clause' (localhost)  
  
 
To fix:
 
To fix:
  
 
Change line 2332 in DynamicPageList2.php from:
 
Change line 2332 in DynamicPageList2.php from:
$sSqlWhere  .= ' AND page_id=rc.rc_cur_id';
+
 
 +
$sSqlWhere  .= ' AND page_id=rc.rc_cur_id';
 
to:
 
to:
$sSqlWhere  .= ' AND ' . $sPageTable .'.page_id=rc.rc_cur_id';
 
  
 +
$sSqlWhere  .= ' AND ' . $sPageTable .'.page_id=rc.rc_cur_id';
  
 
== Reply ==
 
== Reply ==
 +
Thanks, this will be fixed in the next version.
 +
:[[User:Gero|Gero]] 23:59, 25 October 2007 (CEST)

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)