Skip to content

Support RelatedArticles on MediaWiki 1.43 #184

Description

@lens0021

Error 1054: Unknown column 'pl_namespace' in 'where clause'
Function: MediaWiki\Extension\UnifiedExtensionForFemiwiki\HookHandlers\RelatedArticles::getRelatedTitles
Query: (SELECT page_id,page_namespace,page_title,page_is_redirect,page_is_new,page_latest,page_touched,page_len,page_content_model,page_lang FROM pagelinks LEFT JOIN page ON ((page_namespace = pl_namespace) AND (page_title = pl_title)) LEFT JOIN redirect ON ((rd_from = page_id)) WHERE pl_from = 31845 AND pl_namespace IN (0,4,14) AND (page_id != 0) AND rd_from IS NULL ) UNION (SELECT target.page_id AS page_id,target.page_namespace AS page_namespace,target.page_title AS page_title,target.page_is_redirect AS page_is_redirect,target.page_is_new AS page_is_new,target.page_latest AS page_latest,target.page_touched AS page_touched,target.page_len AS page_len,target.page_content_model AS page_content_model,target.page_lang AS page_lang FROM pagelinks LEFT JOIN page link_target ON ((link_target.page_namespace = pl_namespace) AND (link_target.page_title = pl_title)) LEFT JOIN redirect ON ((rd_from = link_target.page_id)) LEFT JOIN page target ON ((target.page_namespace = rd_namespace) AND (target.page_title = rd_title)) WHERE pl_from = 31845 AND pl_namespace IN (0,4,14) AND (link_target.page_id != 0) AND (rd_from != 0) ) UNION (SELECT page_id,page_namespace,page_title,page_is_redirect,page_is_new,page_latest,page_touched,page_len,page_content_model,page_lang FROM pagelinks LEFT JOIN redirect ON ((rd_from = pl_from)) LEFT JOIN page ON ((page_id = pl_from)) WHERE pl_namespace = 0 AND pl_title = '타입' AND rd_from IS NULL AND page_namespace IN (0,4,14) ) UNION (SELECT redirect_from.page_id AS page_id,redirect_from.page_namespace AS page_namespace,redirect_from.page_title AS page_title,redirect_from.page_is_redirect AS page_is_redirect,redirect_from.page_is_new AS page_is_new,redirect_from.page_latest AS page_latest,redirect_from.page_touched AS page_touched,redirect_from.page_len AS page_len,redirect_from.page_content_model AS page_content_model,redirect_from.page_lang AS page_lang FROM (SELECT page_namespace,page_title FROM redirect LEFT JOIN page ON ((page_id = rd_from)) WHERE rd_title = '타입' ) redirects LEFT JOIN pagelinks ON ((pl_namespace = page_namespace) AND (pl_title = page_title)) LEFT JOIN page redirect_from ON ((page_id = pl_from)) WHERE redirect_from.page_namespace IN (0,4,14) ) ORDER BY page_namespace, page_touched DESC LIMIT 6

{
  "id": "5e4c0d6c09195aadc98d3edf",
  "type": "Wikimedia\\Rdbms\\DBQueryError",
  "file": "/srv/femiwiki.com/includes/libs/rdbms/database/Database.php",
  "line": 1198,
  "message": "Error 1054: Unknown column 'pl_namespace' in 'where clause'\nFunction: MediaWiki\\Extension\\UnifiedExtensionForFemiwiki\\HookHandlers\\RelatedArticles::getRelatedTitles\nQuery: (SELECT  page_id,page_namespace,page_title,page_is_redirect,page_is_new,page_latest,page_touched,page_len,page_content_model,page_lang  FROM `pagelinks` LEFT JOIN `page` ON ((page_namespace = pl_namespace) AND (page_title = pl_title)) LEFT JOIN `redirect` ON ((rd_from = page_id))   WHERE pl_from = 31845 AND pl_namespace IN (0,4,14)  AND (page_id != 0) AND rd_from IS NULL  ) UNION (SELECT  target.page_id AS `page_id`,target.page_namespace AS `page_namespace`,target.page_title AS `page_title`,target.page_is_redirect AS `page_is_redirect`,target.page_is_new AS `page_is_new`,target.page_latest AS `page_latest`,target.page_touched AS `page_touched`,target.page_len AS `page_len`,target.page_content_model AS `page_content_model`,target.page_lang AS `page_lang`  FROM `pagelinks` LEFT JOIN `page` `link_target` ON ((link_target.page_namespace = pl_namespace) AND (link_target.page_title = pl_title)) LEFT JOIN `redirect` ON ((rd_from = link_target.page_id)) LEFT JOIN `page` `target` ON ((target.page_namespace = rd_namespace) AND (target.page_title = rd_title))   WHERE pl_from = 31845 AND pl_namespace IN (0,4,14)  AND (link_target.page_id != 0) AND (rd_from != 0)  ) UNION (SELECT  page_id,page_namespace,page_title,page_is_redirect,page_is_new,page_latest,page_touched,page_len,page_content_model,page_lang  FROM `pagelinks` LEFT JOIN `redirect` ON ((rd_from = pl_from)) LEFT JOIN `page` ON ((page_id = pl_from))   WHERE pl_namespace = 0 AND pl_title = '타입' AND rd_from IS NULL AND page_namespace IN (0,4,14)   ) UNION (SELECT  redirect_from.page_id AS `page_id`,redirect_from.page_namespace AS `page_namespace`,redirect_from.page_title AS `page_title`,redirect_from.page_is_redirect AS `page_is_redirect`,redirect_from.page_is_new AS `page_is_new`,redirect_from.page_latest AS `page_latest`,redirect_from.page_touched AS `page_touched`,redirect_from.page_len AS `page_len`,redirect_from.page_content_model AS `page_content_model`,redirect_from.page_lang AS `page_lang`  FROM (SELECT  page_namespace,page_title  FROM `redirect` LEFT JOIN `page` ON ((page_id = rd_from))   WHERE rd_title = '타입'  ) `redirects` LEFT JOIN `pagelinks` ON ((pl_namespace = page_namespace) AND (pl_title = page_title)) LEFT JOIN `page` `redirect_from` ON ((page_id = pl_from))   WHERE redirect_from.page_namespace IN (0,4,14)   ) ORDER BY page_namespace, page_touched DESC LIMIT 6 \n",
  "code": 0,
  "url": "/w/%EB%8F%99%EC%A0%81_%ED%83%80%EC%9D%B4%ED%95%91",
  "caught_by": "entrypoint",
  "backtrace": [
    {
      "file": "/srv/femiwiki.com/includes/libs/rdbms/database/Database.php",
      "line": 1182,
      "function": "getQueryException",
      "class": "Wikimedia\\Rdbms\\Database",
      "type": "->",
      "args": [
        "string",
        "int",
        "string",
        "string"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/libs/rdbms/database/Database.php",
      "line": 1156,
      "function": "getQueryExceptionAndLog",
      "class": "Wikimedia\\Rdbms\\Database",
      "type": "->",
      "args": [
        "string",
        "int",
        "string",
        "string"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/libs/rdbms/database/Database.php",
      "line": 647,
      "function": "reportQueryError",
      "class": "Wikimedia\\Rdbms\\Database",
      "type": "->",
      "args": [
        "string",
        "int",
        "string",
        "string",
        "bool"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/libs/rdbms/database/DBConnRef.php",
      "line": 127,
      "function": "query",
      "class": "Wikimedia\\Rdbms\\Database",
      "type": "->",
      "args": [
        "Wikimedia\\Rdbms\\Query",
        "string",
        "int"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/libs/rdbms/database/DBConnRef.php",
      "line": 302,
      "function": "__call",
      "class": "Wikimedia\\Rdbms\\DBConnRef",
      "type": "->",
      "args": [
        "string",
        "array"
      ]
    },
    {
      "file": "/srv/femiwiki.com/extensions/UnifiedExtensionForFemiwiki/includes/HookHandlers/RelatedArticles.php",
      "line": 111,
      "function": "query",
      "class": "Wikimedia\\Rdbms\\DBConnRef",
      "type": "->",
      "args": [
        "string",
        "string"
      ]
    },
    {
      "file": "/srv/femiwiki.com/extensions/UnifiedExtensionForFemiwiki/includes/HookHandlers/RelatedArticles.php",
      "line": 83,
      "function": "getRelatedTitles",
      "class": "MediaWiki\\Extension\\UnifiedExtensionForFemiwiki\\HookHandlers\\RelatedArticles",
      "type": "->",
      "args": [
        "MediaWiki\\Title\\Title",
        "int"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/HookContainer/HookContainer.php",
      "line": 159,
      "function": "onOutputPageParserOutput",
      "class": "MediaWiki\\Extension\\UnifiedExtensionForFemiwiki\\HookHandlers\\RelatedArticles",
      "type": "->",
      "args": [
        "MediaWiki\\Output\\OutputPage",
        "MediaWiki\\Parser\\ParserOutput"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/HookContainer/HookRunner.php",
      "line": 2773,
      "function": "run",
      "class": "MediaWiki\\HookContainer\\HookContainer",
      "type": "->",
      "args": [
        "string",
        "array",
        "array"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/Output/OutputPage.php",
      "line": 2488,
      "function": "onOutputPageParserOutput",
      "class": "MediaWiki\\HookContainer\\HookRunner",
      "type": "->",
      "args": [
        "MediaWiki\\Output\\OutputPage",
        "MediaWiki\\Parser\\ParserOutput"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/Output/OutputPage.php",
      "line": 2572,
      "function": "addParserOutputMetadata",
      "class": "MediaWiki\\Output\\OutputPage",
      "type": "->",
      "args": [
        "MediaWiki\\Parser\\ParserOutput"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/page/Article.php",
      "line": 970,
      "function": "addParserOutput",
      "class": "MediaWiki\\Output\\OutputPage",
      "type": "->",
      "args": [
        "MediaWiki\\Parser\\ParserOutput",
        "array"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/page/Article.php",
      "line": 864,
      "function": "doOutputFromRenderStatus",
      "class": "Article",
      "type": "->",
      "args": [
        "MediaWiki\\Revision\\RevisionStoreRecord",
        "MediaWiki\\Status\\Status",
        "MediaWiki\\Output\\OutputPage",
        "array"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/page/Article.php",
      "line": 547,
      "function": "generateContentOutput",
      "class": "Article",
      "type": "->",
      "args": [
        "MediaWiki\\User\\User",
        "MediaWiki\\Parser\\ParserOptions",
        "int",
        "MediaWiki\\Output\\OutputPage",
        "array"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/actions/ViewAction.php",
      "line": 78,
      "function": "view",
      "class": "Article",
      "type": "->",
      "args": []
    },
    {
      "file": "/srv/femiwiki.com/includes/actions/ActionEntryPoint.php",
      "line": 733,
      "function": "show",
      "class": "ViewAction",
      "type": "->",
      "args": []
    },
    {
      "file": "/srv/femiwiki.com/includes/actions/ActionEntryPoint.php",
      "line": 510,
      "function": "performAction",
      "class": "MediaWiki\\Actions\\ActionEntryPoint",
      "type": "->",
      "args": [
        "Article",
        "MediaWiki\\Title\\Title"
      ]
    },
    {
      "file": "/srv/femiwiki.com/includes/actions/ActionEntryPoint.php",
      "line": 146,
      "function": "performRequest",
      "class": "MediaWiki\\Actions\\ActionEntryPoint",
      "type": "->",
      "args": []
    },
    {
      "file": "/srv/femiwiki.com/includes/MediaWikiEntryPoint.php",
      "line": 200,
      "function": "execute",
      "class": "MediaWiki\\Actions\\ActionEntryPoint",
      "type": "->",
      "args": []
    },
    {
      "file": "/srv/femiwiki.com/index.php",
      "line": 58,
      "function": "run",
      "class": "MediaWiki\\MediaWikiEntryPoint",
      "type": "->",
      "args": []
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    mw1.43MediaWiki 1.43

    Type

    Projects

    Status
    To do
    Status
    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions