Problem/Motivation

It seems that when updating content containing footnotes from 3.x to 4.x syntax (running 'drush footnotes:upgrade-3-to-4') fields of type "Text (formatted, long, with summary)" completely lose their summary text.

Steps to reproduce

1. Setup field body having summary activated.
2. Create a node having this field. Enter a summary and a footnote in the old 3.x syntax: Lorem ipsum[fn]Footnote text[/fn]. Dolor met...
3. run drush footnotes:upgrade-3-to-4

You will see the summary is empty on node edit, which is a serious problem.

Issue fork footnotes-3437654

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

e5sego created an issue. See original summary.

scott_euser made their first commit to this issue’s fork.

scott_euser’s picture

Status: Active » Needs review

Thanks for spotting this! This should sort it, but can you confirm please?

I am unsure if the summary should also be parsed for existing footnotes - I am correct that it should not be? Ie, summaries are plain text and without footnotes right?

e5sego’s picture

I called the update script from this branch and the summary texts were retained.

A summary can also contain html. It always has the same format as the longtext. But in my opinion the use of footnotes in a summary would be extremely unusual.

scott_euser’s picture

Thanks for testing! Actually it may not be completely unusual as I noted another issue on 3x branch described duplicate footnotes when citations were in the summary in #3428596: Footnotes repeating so I figured I might as well refactor to cover that as well. Look okay to you?

e5sego’s picture

Looks ok for me.

  • scott_euser committed b4a353b1 on 4.0.x
    Issue #3437654 by scott_euser, e5sego: Update via drush deletes text...
scott_euser’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.