Closed sjDCC closed 7 years ago
Hello, We had this issue on DMPOPIDoR, it seems that text fields weren't displayed at all in the docx export.
I think this issue should be resolved in the pull request I made for the date question format : https://github.com/DMPRoadmap/roadmap/pull/92/files#diff-af0660cd0c2c6dd6424fbc0c1aa46634
Thanks Benjamin. We'll take a look. S
I can confirm that the fix appears to work.
Blocked by #222 in Roadmap
Melbourne and Tuuli were both not exporting text_areas properly to docx. Same fault in current Roadmap. Fixed in https://github.com/DigitalCurationCentre/roadmap/commit/71345bd5ba16efa9bf0ef78a6ddd08247a135141
All answer text is now exported in DOCX but problems remain:
Hi @stephaniesimms I don't think this is right. We do want questions to be exported as well as answers. The example you've tested here is a bit odd as usually there wouldn't be so much text in the question, but we don't only want answers. They wouldn't make sense in isolation...
In this example the extended question text seems a bit like guidance, but it's not.
The duplication of exported text as plain text and in its designated form is definitely wrong though
@sjDCC We don't export questions in DMPTool. For one reason, they pose issues when there are page limits for DMPs. I didn't realize this is expected for DMPonline. We can talk about customizing this for our instance if necessary.
Or maybe we should trial removing them? What do you export to give it structure - just section headings? That may be sufficient. @stephaniesimms
Yes @sjDCC - just section headings. You can take a look at any of the PDFs from the public DMPs list: e.g., https://dmptool.org/plans/8273.pdf The public plans come with a cover sheet to provide clarity about copyright concerns mainly. The layout looks very similar for DOCX export but has always been less attractive because Word.
Going to change docx exporting to use htmltoword rather than caracal as it is likely to work better. Not addressing the customisation need for DMPTool to not print questions. New issue #240 for that
Change to htmltoword in https://github.com/DigitalCurationCentre/roadmap/commit/6909f0982ce8e5468a8a6f9dc5a802c7d0e224ee
DOCX output not valid, moving back to Review for fix
I exported a horizon 2020 plan and it successfully downloaded a file, but i got an error from word saying that file cannot be opened:
Was this on your local dev environment @xsrust? It's currently working on UC3 staging and on the live Tuuli service.
@vyruss is this issue happening because the Tuuli fix you made is incompatible with the new roadmap code?
We perhaps need to revert to Ray's earlier code here if that's what's deployed currently.
yes it was on my local dev environment. I didnt try it on any of the other servers
@sjDCC No, this is not the Tuuli hack. This is a one-liner fix to Ray's implementation for Roadmap. It works on dmponline-test too. @xsrust can you open it on Word Online?
not working on Office365 online either. it asks to be opened locally since something went wrong and then throws the same error. This is again off of my local machine but i dont think there should be any difference between that and dmponline-test.
ok. I am able to export the horizon2020 template on dmponline-test if i do not export any of the sections for the first phase. the second and third phases work fine with all sections selected.
Cannot replicate, it works for all phases with me @xsrust.
I can export an empty DOCX file and open it. However, when I select any content (plan details or sections/answers) I get an error when I try to open the file. It appears to be the same error that @xsrust reported above (screenshot).
Have trialled this on DMPonline test with plan details and answers selected and export works fine. Can't login to staging currently
I have done some further testing and can now replicate this on Roadmap-staging and DMPonline-test.
It seems to be limited to the H2020 template and specifically sections with questions that include html tags. I got the error on various docx exports for the initial phase. However, if I chose to export sections that don't include html tags in the question area (e.g. plan details and the final 'other' section) the docx would open as normal.
@dsisu and @stephaniesimms Do you want to double check this? Perhaps trial other templates to ensure I'm right that it's an error isolated to H2020?
Hmmm, one thing I've just noticed, plan details seem to be exported irrespective of whether they're selected or not. @dsisu can you check this and if so, raise a new ticket to report the bug. I'm just about to board a train so will have flaky wifi for next few hours
Trying to export plan based on H2020 template from dmponline-test in docx format gives error below:
Tested exporting AHRC template in docx format from dmponline-test. It works.
I noticed an error that ocurred during editing: if you insert an answer in table format, the table editing window does not shut down once you've saved the answer. I'll have to test this more.
@sjDCC I can't replicate the export plan details error. Tried it in both dmponline live and dmponline-test
Ok, a note to clarify the remaining issue for devs. Docx export isn't working in the context of H2020 alone. All other templates are ok. Should I drag this back to pending or in progress or start a new ticket @vyruss?
A plan details export bug does exist too. I started a new ticket for this #295 What's exported isn't consistent with what is selected in the settings. Problem is limited to a few formats.
@sjDCC I think this should become a new issue as there's probably some invalid HTML in the H2020 template which is breaking the export. Since everything else seems to work, I'd close this one.
Ok, have opened it as a new issue #297
For some reason, completed answers aren't pulling through to the docx export anymore. The document is created and unanswered questions are marked, but any responses users have added aren't added.
Information from text boxes and text fields doesn't pull through but dropdown answers do. From initial tests it doesn't seem to be affecting all templates / plans equally. Legacy data exports ok as far as I can tell, and default templates are the ones primarily affected.
This is a current issue for live services, hence prioritising