Skip to content

fix: Unknown column 'cl.cl_to' in categorylinks JOIN (MW 1.45 compatibility) #143

Description

@gesinn-it-gea

Description

Integration tests fail on MediaWiki 1.45 (dev-master) with MariaDB 11.8 and MySQL 8 due to a DB schema change in MW 1.45 that removes the cl_to column from the categorylinks table.

Error

Wikimedia\Rdbms\DBQueryError: Error 1054: Unknown column 'cl.cl_to' in 'ON'
Function: SD\Specials\BrowseData\QueryPage::reallyDoQueryInternal

Failing query:

SELECT ...
FROM `unittest_smw_object_ids` `ids`
JOIN `unittest_smw_fpt_inst` `insts` ON (...)
LEFT JOIN `unittest_page` `pg` ON (...)
LEFT JOIN `unittest_categorylinks` `cl`
  ON ((cl.cl_from = pg.page_id) AND (cl.cl_to = 'Category1'))
WHERE ...

Affected Jobs

  • test (1.45, dev-master, dev-master, 8.4, 0.7, mysql, mariadb:11.8, false, true)
  • test (1.43, 7.0.0, dev-master, 8.3, 0.6.3, mysql, mysql:8, false, true)

15 integration tests fail, all with the same root cause. MW 1.43 jobs pass.

Root Cause

MW 1.45 restructured the categorylinks table and removed the cl_to column. The JOIN in includes/Specials/BrowseData/QueryPage.php (reallyDoQueryInternal) still references cl.cl_to directly, which is no longer valid.

Fix Required

Update the categorylinks JOIN in QueryPage::reallyDoQueryInternal to use the new MW 1.45 schema. A compatibility shim may be needed to support both MW 1.43 and MW 1.45.

CI Run

https://github.com/SemanticMediaWiki/SemanticDrilldown/actions/runs/27308340228/job/80671946766

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions