Skip to content

[datatables] Column templates work initially but are no longer applied after filtering the table or navigating through the tablepages if limit is set #860

@simontaurus

Description

@simontaurus

Setup

  • MW version: 1.39.5
  • DB (MySQL etc.): MySQL 8.0.17, blazegraph
  • PHP version: 8.1.27 (apache2handler)
  • SMW version: 4.1.3
  • SRF version: 4.2.1
  • Browsers and versions (if applicable): Firefox

Issue

Column templates work initially but are no longer applied after filtering the table or navigating through the tablepages if limit is set

Steps to reproduce

  1. Create a template, e.g. DataTableTestTemplate with content Template called with "{{{1}}}"
  2. Create a query, e.g.
{{#ask: [[Category:OSW92cc6b1a2e6b4bb7bad470dfdcfdaf26]]
|?HasOswId # - =|+ template = DataTableTestTemplate
|?
|?HasLabel
|?HasDescription
|mainlabel=
|format=datatable
|limit=3
}}
  1. Safe the page. First collumn shows Template called with "Item:OSW..." as expected
    image

  2. Type something in the table search bar or navigate to the second result page

  3. First column shows only Item:OSW... => template is no longer called
    image

Example see: https://demo.open-semantic-lab.org/wiki/Item:OSWa59c91666913493a81ecc3539746ba4a

Expected result: Template should always be applied

Observed result: Template is no longer applied after filtering the table or navigating through the tablepages

Workaround: removing |limit=3 leads to the correct result. Documentation states that

Use printout parameters only with a single or a couple of columns in the table, with an undefined or low defer-each parameter, with an undefined or low limit, and with a low datatables-pagelength for it to work properly

Suggestion: Update this to "... with an undefined limit ..."

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions