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

Facets not correctly persisted in hidden form fields #492

Closed
simonw opened this issue May 29, 2019 · 4 comments
Closed

Facets not correctly persisted in hidden form fields #492

simonw opened this issue May 29, 2019 · 4 comments

Comments

@simonw
Copy link
Owner

simonw commented May 29, 2019

Steps to reproduce: visit https://2a4b892.datasette.io/fixtures/roadside_attractions?_facet_m2m=attraction_characteristic and click "Apply"

Result is a 500: no such column: attraction_characteristic

The error occurs because of this hidden HTML input:

<input type="hidden" name="_facet" value="attraction_characteristic">

This should be:

<input type="hidden" name="_facet_m2m" value="attraction_characteristic">
@simonw simonw added the bug label May 29, 2019
@simonw
Copy link
Owner Author

simonw commented May 29, 2019

Code in question:

{% for facet in sorted_facet_results %}
<input type="hidden" name="_facet" value="{{ facet.name }}">
{% endfor %}

@simonw simonw added this to the Datasette 0.29 milestone Jul 7, 2019
@simonw
Copy link
Owner Author

simonw commented Jul 7, 2019

I need to solve #495 first, since that may change the value that is persisted in the hidden fields.

@simonw
Copy link
Owner Author

simonw commented Jul 7, 2019

Part of #551

@simonw simonw removed this from the Datasette 0.29 milestone Jul 7, 2019
@simonw simonw added this to the Datasette 1.0 milestone Jun 6, 2020
@simonw
Copy link
Owner Author

simonw commented Sep 15, 2020

I fixed this in ea340cf for #963 (a duplicate of this issue).

@simonw simonw closed this as completed Sep 15, 2020
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

1 participant