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

FileInputComponent causes corupt download url when it fails to load in page #1

Open
ChasNelson1990 opened this issue Sep 17, 2024 · 1 comment

Comments

@ChasNelson1990
Copy link
Member

To replicate:

  • Go to a resource edit/manage page.
  • Using the dev tools network tab, block the request the get xxxxxxx_FileInputComponent.js.
  • Reload the page so that the fileinputcomponent never loads instead you should see a throbber spinning for ever) as per below.
    !image-20240905-215147.png|width=920,height=633,alt="image-20240905-215147.png"!
  • Click “Update Resource”
  • You should find this breaks the preview and the file download.

The reason this is happening:

  • Some dodgy design of the fileinputcomponent means that if it isn’t loaded, the form element that holds the address of the file in in our file store is left empty (it should be default set to the pre-existing value), when you hit submit on the form the empty value gets submitted as an overwrite.

WE HAVE ALREADY FIXED THIs BEFORE 🤔 I believe in the ADR.

@mixmixmix
Copy link
Member

mixmixmix commented Sep 24, 2024

Ok, so it would be good to fix before we finish fjelltopp/who-romania-ckan#22 because it might be otherwise difficult to reproduce. @A-Souhei would you have some knowledge of this fileinputcomponent stuff?
EDIT: this can be fixed at any point, does not depent on conectivity problems to reproduce the error.

@mixmixmix mixmixmix transferred this issue from another repository Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants