- Issue created by @scott_euser
- Merge request !21Resolve #3413152: Provide a drush command upgrade path for 3x to 4x to convert from [fn] and <fn> to the new modal window → (Open) created by scott_euser
- Status changed to Needs review
11 months ago 12:10pm 12 January 2024 - 🇬🇧United Kingdom scott_euser
This seems to work fine for me, but really needs testing by others to confirm this helps them upgrade sites.
- Status changed to Needs work
11 months ago 6:10pm 14 January 2024 - 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)
Works for simple use cases, thanks.
Problems:
1. Where content creators have added space at start and end of footnote text, inside tags, this space needs to be removed. Footnotes 4.x converts that space totags, and 3.x does, so our content creatores often wrap text in line breaks for clearer layout of HTML layout. Content creators do not want the upgraded footnotes to add a paragraphs at start and end of footnotes, where 3.x had none.
2. The drush command converts ' fake apostrophes to HTML entity references but does not covert real apostrophes ’ (which some fonts print as forward sloping ticks). Our content creators prefer real apostrophes even though standard English keyboards do not have a key for them. So long as normal punctuation breaks Footnotes 4.x, and 🐛 Support adding the text content within the element Fixed remains unfixed, all punctuation which breaks footnotes would need to be converted by an upgade command.
- 🇬🇧United Kingdom scott_euser
Sorry for being a pain but here again can you provide example markup you are running this against + actual vs expected output after the drush command? It would make it much easier for me to work on this.
Thanks!
- 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)
Here is a piece of HTML outputted by the drush command.
<footnotes data-value="" data-text="@Malaria Consortium’s seasonal malaria chemoprevention program: Philanthropy report 2020@, Pg. 5."></footnotes>
I don't what the expected output is. I do know that the inclusion of a real apostrophe in
Consortium’s
as distinct from a fake / keyboard apostrophe, is enough to break footnotes when using 4.x but not when using 3.x.You can see an example of the extra space at start and end of the footnote text at https://www.drupal.org/project/footnotes/issues/3414604#comment-15397449 🐛 Support adding the text content within the element Fixed . If 4.x. is going to turn this extra space into
tags, in a way that 3.x. did not, that space should be removed, and documetation should warn content creators to stop adding such space for clearer layout.
- 🇬🇧United Kingdom scott_euser
I do not fully understand what you mean with the extra space thing. Can you explain further? Thanks!
- 🇬🇧United Kingdom scott_euser
To note
Lorem ipsum<footnotes data-value=""> Reference text here </footnotes>. Dolor sit amet.
Does not cause any
<p>
tag wrappers. So perhaps sorted when 🐛 Support adding the text content within the element Fixed gets in? - Status changed to Needs review
11 months ago 12:34pm 25 January 2024 - 🇬🇧United Kingdom scott_euser
Putting this back to needs review. Probably issues raised when not using CK Editor by @John_B are sorted in 🐛 Support adding the text content within the element Fixed and a follow-up issue can be made to provide a drush command that gives the option to put the reference text like
<footnotes data-value="">content here</footnotes>
instead of<footnotes data-value="" data-text="content here"></footnotes>
. - 🇬🇧United Kingdom scott_euser
For @John_B drush upgrade command for that is in ✨ Combined: Support adding the text content within the element + Drush upgrade path for 3x to 4x Fixed
- Status changed to Fixed
11 months ago 9:06am 31 January 2024 - 🇬🇧United Kingdom scott_euser
Fixed as per combined merge request in ✨ Combined: Support adding the text content within the element + Drush upgrade path for 3x to 4x Fixed .
- Status changed to Needs work
11 months ago 4:11pm 5 February 2024 - 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)
Many thanks. I finally got round to testing. Sorry about the delay.
This does not work where there is a line break before the start of the footnote text.
For example, this works:
Here is some body text.<footnotes data-value="">Here is some footnote text.</footnotes>
When editors are working without WYSYWIG, they will add line breaks for better layout.
Here is some body text.<footnotes data-value=""> Here is some footnote text. </footnotes>
When using the above the footnotes are empty. DBlog says
Warning: DOMDocumentFragment::appendXML(): ^ in Drupal\footnotes\Plugin\Filter\FootnotesFilter->process() (line 161 of /home/website/dev_html/web/modules/contrib/footnotes/src/Plugin/Filter/FootnotesFilter.php)
- 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)
Separate issue, but I am also concerned if we upgrade footnotes using this drush command, and a year later the content creators decide they want to start using CDEditor.
- Status changed to Fixed
11 months ago 11:23pm 5 February 2024 - 🇬🇧United Kingdom scott_euser
Thanks John_B, sounds clear, I have moved it to a follow-up child issue rather than re-opening and added your details ✨ Trim footnotes text via drush command upgrade path from 3.x to 4.x Active .
- 🇬🇧United Kingdom scott_euser
Apologies missed this:
Separate issue, but I am also concerned if we upgrade footnotes using this drush command, and a year later the content creators decide they want to start using CDEditor.
Yes you can see my comment here 🐛 Support adding the text content within the element Fixed . I created an issue for that here ✨ Support upcasting from plain text hand-written code to CK Editor 5 plugin Active and added instructions in case someone wants to tackle it.
Automatically closed - issue fixed for 2 weeks with no activity.