comunica / jQuery-Widget.js

🖼 A jQuery widget to query heterogeneous interfaces using Comunica SPARQL
http://query.linkeddatafragments.org/
MIT License
18 stars 35 forks source link

Missing default datasources on page load. #8

Closed joachimvh closed 5 years ago

joachimvh commented 6 years ago

When loading the widget, if the first query selected is one with multiple datasources, only one of those datasources is selected.

When the query gets selected through the dropdown box, all the datasources appear though. But in my use case there is only 1 query so it is actually impossible to select another query... unless you refresh the page weirdly enough. When refreshing the page suddenly "select a query" box is empty (might be another bug), and the query can be selected again (in which case the missing datasources appear).

rubensworks commented 6 years ago

This issue was wrongly closed...

ColinMaudry commented 5 years ago

Same problem here. Has the root cause been identified?

ColinMaudry commented 5 years ago

The problem seems to be related to how selectedDatasources are populated when the datasource selection menu is initialized. Am I right?

If so, a workaround may be to hardcode the desired selectedDatasources in queries.json after running queries-to-json. I tried, but the format of the selectedDatasources block doesn't seem to be the same as for datasources, and that didn't work.

rubensworks commented 5 years ago

I'm not sure what the exact problem is, we haven't found the time yet to look into this.

If so, a workaround may be to hardcode the desired selectedDatasources in queries.json after running queries-to-json

I think we can get to an easier solution that does not require changing the queries.json file. (Not sure what yet though)