Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data API window shows the datastore_search_sql endpoint even when switched off #7289

Open
amercader opened this issue Dec 20, 2022 · 3 comments

Comments

@amercader
Copy link
Member

CKAN version
2.9 / 2.10

Describe the bug
The Data API window shows the datastore_search_sql endpoint even when switched off (which is the default)

Screenshot 2022-12-20 at 15-30-25 Test csv numeric - test csv - CKAN

The snippet should use config.get("ckan.datastore.sqlsearch.enabled") to show the row only when enabled.

Also looks like you need to click two times to open the window, probably a little bug in the js module. (Why do we need an AJAX call to get the content of the modal in the first place?)

svetozarstojkovicdatopian pushed a commit to svetozarstojkovicdatopian/ckan that referenced this issue Feb 8, 2023
@svetozarstojkovicdatopian

@amercader PR #7382 for this issue is created. Please review and ping if necessary.

Upon investigating the code I had a discussion with older colleague and the reason is that this content is displayed in popup form and it is executing asynchronously.

@amercader
Copy link
Member Author

@svetozarstojkovicdatopian thanks, I meant why we need to load the contents of the popup asynchronously and not render it directly in Jinja like the rest of the template.

@svetozarstojkovicdatopian

@amercader I have been talking to some developers with more experience about this issue and what they are saying is that the popup is being rendered using Jinja but the ajax calls triggers that render.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants