Page MenuHomePhabricator

1.31.0-alpha / action=edit causes Error: 42601 ERROR: syntax error at or near ")" LINE 1: ...ent_model FROM "templatelinks" LEFT JOIN ("page" )
Closed, ResolvedPublic

Description

MediaWiki	1.31.0-alpha (ed6cb7d)
PHP	7.1.1 (apache2handler)
PostgreSQL	9.3.12
ICU	57.1

Stack

Simply trying to edit a page causes:

Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
Title::getRestrictionTypes: applicable restrictions to [[Lorem ipsum]] are {edit,move}
Title::getRestrictionTypes: applicable restrictions to [[Lorem ipsum]] are {edit,move}
Title::getRestrictionTypes: applicable restrictions to [[Lorem ipsum]] are {edit,move}
[exception] [5f4d3c8b6b79379e20a79a1f] /mw-master-pg/index.php?title=Lorem_ipsum&action=edit   Wikimedia\Rdbms\DBQueryError from line 1168 of ...\includes\libs\rdbms\database\Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: SELECT  tl_namespace,tl_title,page_id,page_namespace,page_title,page_restrictions,page_is_redirect,page_is_new,page_random,page_touched,page_links_updated,page_latest,page_len,page_content_model  FROM "templatelinks" LEFT JOIN ("page" ) ON ((page_namespace=tl_namespace) AND (page_title=tl_title))   WHERE tl_from = '3065'  
Function: Title::getLinksFrom
Error: 42601 ERROR:  syntax error at or near ")"
LINE 1: ...ent_model  FROM "templatelinks" LEFT JOIN ("page" ) ON ((pag...
                                                             ^


#0 ...\includes\libs\rdbms\database\DatabasePostgres.php(262): Wikimedia\Rdbms\Database->reportQueryError(string, string, string, string, boolean)
#1 ...\includes\libs\rdbms\database\Database.php(980): Wikimedia\Rdbms\DatabasePostgres->reportQueryError(string, string, string, string, boolean)
#2 ...\includes\libs\rdbms\database\Database.php(1363): Wikimedia\Rdbms\Database->query(string, string)
#3 ...\includes\Title.php(3644): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#4 ...\includes\Title.php(3673): Title->getLinksFrom(array, string, string)
#5 ...\includes\EditPage.php(4034): Title->getTemplateLinksFrom()
#6 ...\includes\EditPage.php(2882): EditPage->getTemplates()
#7 ...\includes\EditPage.php(705): EditPage->showEditForm()
#8 ...\includes\actions\EditAction.php(60): EditPage->edit()
#9 ...\includes\MediaWiki.php(499): EditAction->show()
#10 ...\includes\MediaWiki.php(293): MediaWiki->performAction(Article, Title)
#11 ...\includes\MediaWiki.php(851): MediaWiki->performRequest()
#12 ...\includes\MediaWiki.php(523): MediaWiki->main()
#13 ...\index.php(43): MediaWiki->run()
#14 {main}
Title::getRestrictionTypes: applicable restrictions to [[Lorem ipsum]] are {edit,move}
Title::getRestrictionTypes: applicable restrictions to [[Lorem ipsum]] are {edit,move}
Title::getRestrictionTypes: applicable restrictions to [[Lorem ipsum]] are {edit,move}

Event Timeline

mwjames created this task.Nov 29 2017, 8:09 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 29 2017, 8:09 PM
mwjames renamed this task from / action=edit causes Error: 42601 ERROR: syntax error at or near ")" LINE 1: ...ent_model FROM "templatelinks" LEFT JOIN ("page" ) to 1.31.0-alpha / action=edit causes Error: 42601 ERROR: syntax error at or near ")" LINE 1: ...ent_model FROM "templatelinks" LEFT JOIN ("page" ).Nov 29 2017, 8:09 PM
Reedy edited projects, added Wikimedia-Rdbms; removed MediaWiki-General.
Anomie claimed this task.Nov 29 2017, 8:47 PM

Change 394140 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] Database: Fix degenerate parenthesized joins

https://gerrit.wikimedia.org/r/394140

Change 394140 merged by jenkins-bot:
[mediawiki/core@master] Database: Fix degenerate parenthesized joins

https://gerrit.wikimedia.org/r/394140

Anomie closed this task as Resolved.Nov 30 2017, 3:00 PM