SemanticMediaWiki / SemanticResultFormats

Provides additional visualizations (result formats) for Semantic MediaWiki
https://www.semantic-mediawiki.org/wiki/Extension:Semantic_Result_Formats
Other
45 stars 76 forks source link

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

Open simontaurus opened 6 days ago

simontaurus commented 6 days ago

Setup

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
    }}
  3. Safe the page. First collumn shows Template called with "Item:OSW..." as expected image

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

  5. 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 ..."

simontaurus commented 3 days ago

@thomas-topway-it: It seems like templates are not applied to defered results