I’ve been trying to import some SQL queries from one discourse forum to another. Worked fine for the last few years. However, now when I try to import a query it allows me to select it and then nothing happens. Thoughts?
AI-generated summary
The issue discusses a problem with the Discourse Data Explorer import feature, where importing SQL queries via the import button no longer works, as nothing happens after selecting a file. dinoscool3 reports this issue started around October, affecting the ability to import JSON query files efficiently. pfaffman confirms the import button appears unresponsive. Arkshine identifies the cause as a change in the pick-files-button.js file that removed the this.onFilesPicked(files); call, which was necessary for the import functionality. dinoscool3 asks if this is fixable, and Arkshine confirms it requires a fix. keegan later confirms the issue has been resolved with a fix in the Discourse repository.
You’ll need to share more information like what the query was.
How are you trying to import them?
This is an example for one of the queries:
--[params]
-- integer :page = 0
SELECT topic_views.*, single_sign_on_records.external_id, topics.title
from topic_views
left join single_sign_on_records
on topic_views.user_id = single_sign_on_records.user_id
left join topics
on topic_views.topic_id = topics.id
OFFSET :page * 1000
LIMIT ALL
I try to import it using the import button and selecting the file (attached)
topic-views.dcquery.json (605 Bytes)
Edit:
Using this button:
I hadn’t remembered that was a feature. When I try clicking import and selecting a file, nothing seems to happen.
It worked fine up until about October, you could export the json file and import no problem. Now as you say, nothing happens. Its much quicker than copying and pasting because I have a large number of files.
You might move this to Contribute > Bug
This is a side effect of this change (in pick-files-button.js):
By removing this.onFilesPicked(files);, you remove the action call defined here:
So this was a change made by Discourse so there isn’t a way for me personally to fix?
That’s right; it’s best to wait for a fix.
Thanks for reporting this! It should now be resolved ![]()
This topic was automatically closed after 42 hours. New replies are no longer allowed.
