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

File attachments lost upon location import #6062

Closed
scratchpads opened this issue Nov 14, 2019 · 15 comments · Fixed by #6163
Closed

File attachments lost upon location import #6062

scratchpads opened this issue Nov 14, 2019 · 15 comments · Fixed by #6163
Labels
topic: import/export this involves the import or export of files from a scratchpad

Comments

@scratchpads
Copy link

Description:

I recently updated my location nodes using the Excel import function (first exporting the file, then changing some entries in Excel, and then importing the edited file). I was pleased to see that this worked ok for many of the fields, but then had to realise that all the file attachments I had manually added to these locations (containing JPG images of the sample sites), no longer appeared in the locations view.
This is in spite of the fact that these images remain present on the site, and that both the export file that was generated, as well as the edited import file I used did contain the file names separated by pipes in the "File attachments (Filename)" column (I am happy to send you that file).
However, when I then generated a new export file, this file no longer contained any entries in that column, suggesting that these entries were deleted upon import.
Can you fix this somehow? I do not want to have to upload these manually again, and moreover, I need to add many more locations and sample site images for an ongoing project, so I really hope I can do this via the import function.
Cheers, Lukas

@benscott benscott added the topic: import/export this involves the import or export of files from a scratchpad label Nov 27, 2019
@lukasscharer
Copy link

I was glad to see this update about my recent comment on the Scratchpads import/export function. But at the same time, I am a bit weary, since the same happened to a comment I had made on the same general topic in early March this year, but then there were no updates about that over the last months.
Do you have any idea how soon we can expect a fully functional import/export function? And while we wait for that, would it not be appropriate to inform users about the fact that it currently does not work properly?
Cheers, Lukas

@benscott
Copy link
Member

benscott commented Dec 6, 2019

My apologies it wasn't fixed earlier, we usually have one developer on rotation looking after Scratchpads and that hasn't been enough to keep on top of the issues, resulting in some of the more complicated bugs being pushed back. But for the next ten weeks' all four of the developers are working full time on Scratchpads to fix all the outstanding bugs & bring the issue list down to zero. The import/export bugs are being tackled first, with the first release scheduled for four weeks' time. So the import/export bugs will definitely be sorted at that point - and in the future, any new issues found will be fixed much faster, as they won't have to compete with all our legacy issues.

@PaulKiddle
Copy link
Contributor

The changes are made and merged to master, but there is a little extra to do after the next release:

When this is released there are a few steps that are required to fully resolve #6062. These are:

  1. Remove the field_file field config from the location content type - it's a biblio field and shouldn't be duplicated here delete from field_config_instance where id = 166;
  2. Add new field called "File attachments", with type File, and widget Media multiselect to the location content type
  3. Add formats: jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp
  4. Set number allowed to unlimited

@lukasscharer
Copy link

Thanks for this update, but this is frankly a bit cryptic to me (and probably not primarily indented for me). What I would love to know for practical reasons is when you expect the import/export function to work properly. I have a large project that will need a lot of efficient editing, and I need to decide if I can expect to have this functional soon (i.e. weeks, not months), or if I need to find another solution.

@PaulKiddle
Copy link
Contributor

Hi @lukasscharer, we plain to have this released and working again in a couple of weeks.

@jrdh
Copy link
Member

jrdh commented Feb 19, 2020

Hi @lukasscharer, I've just applied the changes listed above so everything should be fixed for you know. I'll close this issue now but do comment if you have any problems. Thanks for your patience!

@jrdh jrdh closed this as completed Feb 19, 2020
@lukasscharer
Copy link

Dear all,
I am not sure what you have done, but the file attachments in my location nodes are unfortunately still missing. Moreover, I have just used the import function to try and upload that data again (i.e. with a import file containing the image links in the "File attachments (Filename)" column), but it does not seem to work, just as before.
I have now uploaded the relevant excel sheet to this comment (but note that I had to convert it to .xlsx, since GitHub does not seem to support .xls, which is what the Scratchpad creates upon export).
I hope this can be fixed ASAP.
Cheers, Lukas

node_importer_location_xls_edited.xlsx

@jrdh
Copy link
Member

jrdh commented Mar 4, 2020

Hi @lukasscharer, this should now be fully fixed for you. Sorry again about the delays, this was a hard one to track down! I'll keep my eye on this issue over the next few days so feel free to reopen it if you have any more issues with this again.

@lukasscharer
Copy link

lukasscharer commented Mar 4, 2020 via email

@jrdh
Copy link
Member

jrdh commented Mar 6, 2020

Hi @lukasscharer, happy to have a quick chat, however before that can you just try one more time for me? I've turned on Skip hash check for the Location (XLS) importer which should ensure scratchpads always tries to update the locations with the data from the uploaded spreadsheet even when it thinks nothing's changed.

@lukasscharer
Copy link

lukasscharer commented Mar 6, 2020 via email

@jrdh
Copy link
Member

jrdh commented Mar 9, 2020

Hi @lukasscharer, I just managed to get a successful import to work using the most recent file you'd tried (though I renamed it joshtest.xls to be clear it was me). This updated the location nodes successfully, for example: http://macrostomorpha.info/node/3337. The problem this time was that the fix I put in place at the end of last week wasn't correctly released and therefore the Macrostomorpha scratchpad was using the old code without the fix, hence why I could not recreate the problem during local testing but you still had the issue when you tried it. Hopefully that solves it for you, feel free to try and import the data again just test it to make sure you're happy with it.

@lukasscharer
Copy link

Hi Josh. Thanks a lot. It seems to work now, which is great. Is this now specific to the location import, or should the import function be fixed everywhere? Cheers, Lukas

@jrdh
Copy link
Member

jrdh commented Mar 10, 2020

@lukasscharer - it should be fixed everywhere, were you experiencing issues on other imports?

@lukasscharer
Copy link

Hi Josh. No, I have not. I'll try to find time in the next weeks to test the import function now that it seems to work. Cheers, Lukas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: import/export this involves the import or export of files from a scratchpad
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants