Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
D
DynamicPageList
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 36
    • Issues 36
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 10
    • Merge Requests 10
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • HydraWiki
  • Extensions
  • DynamicPageList
  • Issues
  • #4853

Closed
Open
Opened Jan 08, 2020 by Thomas Jones-Low@tjoneslow

Query::getSubcategories() function returns bad query error

Using a DPL query using the "*" on category syntax return a query error and fails.

From the documentation

{{#dpl:
 | category=+Africa|Europe 
 | category=**Politics and conflicts
 | ordermethod=category,sortkey
 | headingmode=ordered
}}

Using Category = **<category> ends up returning the following error

Error Code: 1054. Unknown column 'categorylinks.cl_to' in 'where clause'

The query in question is:

SELECT DISTINCT page_title FROM mw_page INNER JOIN mw_categorylinks
ON ((page.page_id = categorylinks.cl_from))
WHERE page_namespace = '14' AND categorylinks.cl_to = 'Ship';

Note: Our wiki has the tables prefixed with "mw_" . They query definition in the Query::getSubcategories(Query.php line 539) needs to be calling $DB->tableName() around each of the tables referenced in the where and join clauses.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: hydrawiki/extensions/DynamicPageList#4853