Jump to content

Topic on Extension talk:Disambiguator

Error in SQL Statement of SpecialDisambiguationPages.php

4
Heinrich krebs (talkcontribs)

Hi,

I added the extension, but the Special-Page didn't work. I activated SQL-Debug and realised, that the SQL-Statement didn't include my table-prefixes. Once I added them manually, enclosed in `` for they contain a -, which is otherwise not allowed, the page works fine.

I have no idea, why it works with SpecialDisambiguationPagesLinks.php, though.

Any ideas, or is it a fault on the scripts side?

KFCSpike (talkcontribs)

Installed this on my wiki today and Special:DisambiguationPages is broken (A database query error has occurred. This may indicate a bug in the software.)

Suspect its because I also use a table-prefix (set in $wgDBprefix) - will this extension be updated to support this or do I need to go hacking around the code myself to fix?

Kghbln (talkcontribs)

This message is pretty bad and should probably better say (A database query error has occurred. See the manual on how to debug SQL errors.) Anyway, this is another story.

$wgShowSQLErrors = true;
$wgDebugDumpSql  = true;
$wgShowDBErrorBacktrace = true;
$wgDebugLogFile = "/var/log/mediawiki/yourwiki-debug.log";

This should help finding the problem. Only do the dumping for a few operations since this file gets big very fast. Depending on the outcome a bug should be filed. Cheers

Florianschmidtwelzow (talkcontribs)

Hello, same error, here my data ;)

Query:

SELECT page_props.pp_page AS value,page.page_namespace AS namespace,page.page_title AS title FROM `wiki_page`,`wiki_page_props` WHERE (page_id = pp_page) AND pp_propname = 'disambiguation' AND (page_namespace != 10) ORDER BY value LIMIT 51

Function:

SpecialDisambiguationPages::reallyDoQuery

Error:

1054 Unknown column 'page_props.pp_page' in 'field list' (localhost)

(yes, without prefix)

If i'm right, one solution is: Edit file: SpecialDisambiguationPages.php find "'fields' => array(" delete table prefix "page_props" and "page" :)

See -> https://bugzilla.wikimedia.org/show_bug.cgi?id=65086

Reply to "Error in SQL Statement of SpecialDisambiguationPages.php"