-
Notifications
You must be signed in to change notification settings - Fork 109
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
Bullet points - strange formatting #2147
Comments
Unable to replicate on Live or Test servers. @magdalenadrafiova is going to contact person who raised issue. It might be a specific template. |
We have other admins now having the same issue. They are using Chrome and the characters appear after they simply ‘download’ the template as Word and open it (no typing etc) Let me know if we need to know something more . |
@magdalenadrafiova Is it possible to get a copy of the downloaded templates? |
@johnpinto1 I would suggest looking at that particular plan's answer in the database to see if there is any odd formatting (e.g. maybe the user did a copy-paste from Word that had some extra HTML markup). I did a quick test in DMPTool and could not replicate the issue so I think it may be related to that specific template/plan. |
@magdalenadrafiova and @briri for that input. Will check. |
Hi, the .pdf downloads correctly, the word doc has the funny characters. John is looking at it now. |
The Word docx and pdf documents @dsisu provided are attached I can read the Word docx correctly on a Linux machine, but the same docx in Windows replaces a bullet point • with ∉ character. It looks like it is an issue with conversion from html to docx by the Ruby gem htmltoword. Will need some hacking to solve issue. |
We will have to think what format we want to download the options as. So, people tick boxes to select some options, what do we want these to look like in the Word doc download? If we use symbols similar to bullet points, people will imagine this is a bulleted list and may expect to be able to edit it. However it's not possible; the download isn't a bulleted list but plain text with a a bullet-like symbol in front of it. If John fixes the file so that it downloads the text as a bulleted list, then Word inserts the funny symbol in front of it, possibly to highlight it's not a list but some kind of slection. I think this is why Word is struggling. We need to figure out what do we want the selected options to download as. Maybe we could have them as text with a couple of tick symbols in front of it, to indicate these were options selected (from a list of options). Hopefully this will make sense once I've inserted some screenshots. |
Sorry guys, I don't have time to format the images, please enlarge them to read my comments on the text. |
A tick symbol would hopefully remind users that what they are downloading is not a potentially editable bulleted list but a list of selections they made when they filled in the plan. |
I'm going to send you the downloaded plans, which should hopefully help you work out what I mean, if the above isn't making sense. |
I have to go now, I'll be able to respond to any queries later in the evening. |
We had this issue in DMP OPIDoR on our servers. I can confirm that this issue comes from the We managed to bypass this by replacing our Side note : the htmltoword doesn't seem to be able to export images in |
Thanks @benjaminfaure for this comment. |
The fix was suggested by @benjaminfaure: #2147 (comment) Changes: Replaced <li> tag with <ol> in _plan.erb as suggested by @benjaminfaure that <li> tag being transformed as € sign in the Word export. Fix for issue #2147
@xsrust pointed me to this bug with htmltoword |
ok. send in a separate PR. thanks @johnpinto1 |
updates a previous fix. This time we only apply the change suggested by @benjaminfaure to docx. The fix was suggested by @benjaminfaure: #2147 (comment) Changes: Replaced <li> tag with <ol> in _plan.erb as suggested by @benjaminfaure that <li> tag being transformed as € sign in the Word export. Fix for #2147.
when viewed in an old Word editor. The fix follows the solution suggested in the HtmlToWord bug "List item bullets corrupted in Microsoft Word" karnov/htmltoword#73 suggested by David Verhasselt @dv. Changes: - Firstly, removed earlier attempted fix in commit 5ef7e05 (Fix for format issues for bullet points in Plan docx exports). - Made a copy of Htmltoword (1.1.0) xslt stylesheets functions.xslt and numbering.xslt and made changes suggested by karnov/htmltoword#73 - Prepended the Htmltoword library XSLTHelper method xslt_path() in config/initializers/htmlto_word_xslt_helper.rb. This method ensures the Htmltoword library picks up the changed numbering.xslt template instead of the library's version. Fix for issue #2147.
Fix for this is in review and @dsisu tested the following file |
when viewed in an old Word editor. The fix follows the solution suggested in the HtmlToWord bug "List item bullets corrupted in Microsoft Word" karnov/htmltoword#73 suggested by David Verhasselt @dv. Changes: - Firstly, removed earlier attempted fix in commit 5ef7e05 (Fix for format issues for bullet points in Plan docx exports). - Made a copy of Htmltoword (1.1.0) xslt stylesheets functions.xslt and numbering.xslt and made changes suggested by karnov/htmltoword#73 - Prepended the Htmltoword library XSLTHelper method xslt_path() in config/initializers/htmlto_word_xslt_helper.rb. This method ensures the Htmltoword library picks up the changed numbering.xslt template instead of the library's version. - pinned version of htmltoword to 1.1.0 Fix for issue #2147.
tested this and bullets look good now. Thanks @johnpinto1 and @benjaminfaure for advice! |
When user downloads the plan - the bullet points appear to be strange, see image below.
Would you be able to look into what have triggered this and find a fixture for this?
The text was updated successfully, but these errors were encountered: