Last modified: 2012-12-19 16:40:23 UTC
https://en.wikipedia.org/w/index.php?title=Special%3ACategoryTree&target=Meteorites&mode=all&namespaces= gives the error: Technical details about this error: Last attempted database query: (SQL query hidden) Function: CategoryTree::renderParents MySQL error: 1054: Unknown column 'page_namespace' in 'field list' (10.0.6.69)
See also http://wikitech.wikimedia.org/view/Schema_changes
(In reply to comment #1) > See also http://wikitech.wikimedia.org/view/Schema_changes Why?
$res = $dbr->select( 'categorylinks', array( NS_CATEGORY => 'page_namespace', 'cl_to' => 'page_title' ), array( 'cl_from' => $title->getArticleID() ), __METHOD__, array( 'LIMIT' => $wgCategoryTreeMaxChildren, 'ORDER BY' => 'cl_to' ) );
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: SELECT page_namespace,page_title AS cl_to FROM `mw_categorylinks` WHERE cl_from = '2' ORDER BY cl_to LIMIT 200 from within function ‘CategoryTree::renderParents.’ Database returned error ‘1054: Unknown column 'page_namespace' in 'field list' (192.168.0.212).’ reedy@fenari:~$ mwscript eval.php enwiki > $dbr = wfGetDB( DB_SLAVE ); > $res = $dbr->select( 'categorylinks', array( NS_CATEGORY => 'page_namespace', 'cl_to' => 'page_title' ), array( 'cl_from' => 1 ), __METHOD__, array( 'LIMIT' => 10, 'ORDER BY' => 'cl_to' ) ); A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: SELECT page_namespace,page_title AS cl_to FROM `categorylinks` WHERE cl_from = '1' ORDER BY cl_to LIMIT 10 Function: Error: 1054 Unknown column 'page_namespace' in 'field list' (10.0.6.46) reedy@fenari:~$ mwscript eval.php enwiki > $dbr = wfGetDB( DB_SLAVE ); > $res = $dbr->select( 'categorylinks', array( 'page_namespace' => NS_CATEGORY, 'page_title' => 'cl_to' ), array( 'cl_from' => 1 ), __METHOD__, array( 'LIMIT' => 10, 'ORDER BY' => 'cl_to' ) );
> $sql = $dbr->selectSQLText( 'categorylinks', array( 'page_namespace' => NS_CATEGORY, 'page_title' => 'cl_to' ), array( 'cl_from' => 1 ), __METHOD__, array( 'LIMIT' => 10, 'ORDER BY' => 'cl_to' ) ); > var_dump( $sql ); string(118) "SELECT 14 AS page_namespace,cl_to AS page_title FROM `categorylinks` WHERE cl_from = '1' ORDER BY cl_to LIMIT 10 " https://gerrit.wikimedia.org/r/39384
Fixed