Semanticmediawiki: Using the "further results" link when the query contains `headers=plain` with a piped link in a header breaks the output

Created on 14 Oct 2018  路  6Comments  路  Source: SemanticMediaWiki/SemanticMediaWiki

Setup and configuration

  • SMW version: 3.0.0
  • MW version: 1.30.0
  • PHP version: 7.1.22-1+ubuntu16.04.1+deb.sury.org+1 (apache2handler)
  • DB system (MySQL, Blazegraph, etc.) and version: MariaDB 10.1.31-MariaDB-1~xenial

(see also Special:Version)

Issue

After upgraing from SMW 2.5.6 to SMW 3.0.0, we noticed that viewing a "further results" link on some queries started producing The part "..." of the query was not understood. notices. After a bit of investigation, I narrowed the cause to the use of piped links in table headers with the headers=plain option set: the header content starting from the pipe is truncated from the header, and the content after the pipe is appended to the end of the query. See sandbox and resulting Special:Ask page.

Query

Inline

{{#ask:
 [[Archseries::Performapal]]
 [[Primary type::Pendulum Monster]]
 [[Class 1::Official]]
 |?Pendulum Scale=[[Pendulum Scale|Scale]] <!--transgressing syntax -->
 |headers=plain
 |limit=5
}}

Special page

{{#ask: [[Archseries::Performapal]] [[Primary type::Pendulum Monster]] [[Class 1::Official]]Scale]]
 |?Pendulum Scale=[[Pendulum Scale
 |format=table
 |limit=5
 |offset=5
 |sort=
 |order=asc
 |headers=plain
 |mainlabel=
}}
bug

Most helpful comment

|?Pendulum Scale=[[Pendulum Scale|Scale]]

Yes, we never had a test case for this therefore tests were unable to detect the issue, furthermore an example should be created on the sandbox to confirm that #3584 resolves the issue

All 6 comments

Thanks a lot for reporting. Isn't this something where you would rather use the "plainlist" format formerly known as "template" format?

format=plainlist appears to suffer from this issue as well; see sandbox and Special:Ask (of course, if you meant something different with your suggestion, please correct me =) ).

We completed the update to 3.0.0 literally just a few hours ago, so we haven't had much time to start making use of new features or to change functionality/behavior where breakages didn't occur (though I do intend to convert our uses of format=template to format=plainlist).

No, this will indeed not work either. I was thinking of this which lets you define arbitrary headers.

We completed the update to 3.0.0 literally just a few hours ago

Take your time. Rome was not build in a day either. :)

Aah, right, building a table by using template. We do that in places, though (as you might expect) with format=template instead of other result formats (and without use of introtemplate/outrotemplate, by just having the query surrounded with the desired table header/footer). This will be something I'll be playing with in the future, to be sure.

|?Pendulum Scale=[[Pendulum Scale|Scale]]

Yes, we never had a test case for this therefore tests were unable to detect the issue, furthermore an example should be created on the sandbox to confirm that #3584 resolves the issue

furthermore an example should be created on the sandbox to confirm that #3584 resolves the issue

https://sandbox.semantic-mediawiki.org/wiki/Issue/3523

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Larivact picture Larivact  路  4Comments

seth2740 picture seth2740  路  3Comments

jaideraf picture jaideraf  路  3Comments

mwjames picture mwjames  路  3Comments

djoris picture djoris  路  4Comments