SemanticMediaWiki / SemanticResultFormats

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

Format filtered does not show slider at distance filter #669

Closed markmuzenhardt closed 2 years ago

markmuzenhardt commented 2 years ago

I have MediaWiki 1.35 installed, SemanticResultFormats 3.2.0 and SemanticMediaWiki 3.2.3. With the following code I have tried to show a filtered table, using the distance filter. But no matter what I change, the silder of the distance filter never shows up.

{{#ask:[[Geokoordinate::+]] |?Geokoordinate=|+filter=distance|+distance filter origin=49.473, 10.985|+distance filter unit=m|+distance filter initial value=200|+distance filter max distance=2000|+hide=no |format=filtered |limit=100 |filter position=top |views=table }}

kghbln commented 2 years ago

Thanks for reporting. Probably creating a example on the sandbox wiki will allow to demonstrate the issue live.

markmuzenhardt commented 2 years ago

I did a demonstration on:

https://sandbox.semantic-mediawiki.org/wiki/Issue/SRF/669

it shows exactly what the problem is: You get no slider for the search distance.

I couldn't figure out, what I did wrong. Maybe it's my code, but it could also be a SMW-Bug. I copied my example from wiengeschichtewiki, where it works. But at fuerthwiki and sandbox-wiki it doesn't work.

kghbln commented 2 years ago

Thank you for creating the example. I very much suspect that the result format is to blame here. FürthWiki and Sandbox are on MW 1.35.x whereas WienGeschichteWiki is still on MW 1.31.x

@krabina Could you do a sanity check on the code to make sure that it is as required?

krabina commented 2 years ago

I can confirm that on a development version of the Vienna History Wiki, this problem also occurs. So it is definitely a bug related to the upgrade to MW 1.35.

kghbln commented 2 years ago

Thanks for your info.

krabina commented 2 years ago

Some further observations: The slider uses Ion.RangeSlider that is now in version 2.3.1 (SRF uses 2.0.3). However, I tried replacing the following files

https://github.com/SemanticMediaWiki/SemanticResultFormats/blob/master/formats/filtered/resources/js/ext.srf.filtered.slider.js with https://github.com/IonDen/ion.rangeSlider/blob/master/js/ion.rangeSlider.js

and https://github.com/SemanticMediaWiki/SemanticResultFormats/blob/master/formats/filtered/resources/css/ext.srf.filtered.slider.css with https://github.com/IonDen/ion.rangeSlider/blob/master/css/ion.rangeSlider.css

and edited https://github.com/SemanticMediaWiki/SemanticResultFormats/blob/master/formats/filtered/package.json with the updated version info, but this does not help.

It seems that in 1.35 some jQuery things were removed: https://www.mediawiki.org/wiki/Release_notes/1.35 Maybe it is this?: https://phabricator.wikimedia.org/T234581

gesinn-it-gea commented 2 years ago

@markmuzenhardt can you please check, if PR #685 fixes the issue