Support adding the text content within the <footnotes> element

Created on 14 January 2024, 11 months ago
Updated 14 February 2024, 10 months ago

Problem/Motivation

When using plain text, allow editors to enter the reference text content between the <footnotes> tags rather than in the data attribute. Entering within the data attribute would be too complicated for a content editor to write that HTML as it means escaping their content for the attribute context.

🐛 Bug report
Status

Fixed

Version

4.0

Component

Footnotes

Created by

🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @John_B
  • Status changed to Postponed: needs info 11 months ago
  • 🇬🇧United Kingdom scott_euser

    Can you provide steps/screenshot('s) of how you want to use it? Is it source editing or actual unformatted text? Can you provide example markup of what you expect to work that is being escaped.

  • 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)

    Here is a typical footnote:

    "Budget: 1,694,339.00 (USD)" Malaria Consortium, "Support Scale up of Seasonal Malaria Chemoprevention (SMC)," 2015. We also searched the Gates Foundation's grant database to see whether it made any additional grants to Malaria Consortium for SMC work, but only saw this grant (grant page available at Gates Foundation, "Malaria Consortium").

    "Malaria Consortium is implementing and assessing the feasibility of a community-based seasonal malaria chemoprevention (SMC) project in Katsina state, northern Nigeria, with funding from the Bill & Melinda Gates Foundation. Following new World Health Organisation policy recommendations on SMC, this project administers full antimalarial treatments during the malaria season in areas with highly seasonal malaria transmission, to prevent illness among children under five."

    "The project’s objectives are:

    • To design, in consultation with key local stakeholders, an appropriate community-based delivery system for SMC in Katsina state based on formative research, which will review aspects relating to feasibility, community acceptability, effectiveness and cost
    • To launch and execute SMC delivery according to the selected delivery system and collect data on process indicators and costs
    • To evaluate community acceptability, costs and effectiveness of the delivery system for SMC
    • To inform future national and state plans for SMC continuation/ scale up by disseminating findings and sharing experiences with key stakeholders"

    Malaria Consortium, Project Brief: Seasonal malaria chemoprevention, Katsina, pp. 1-2.

    Malaria Consortium told us that it trained over 3,600 CDs and nearly 200 health workers to provide about 1.6 million courses of SMC to roughly 350,000 children who lived in 4 "local government areas" (LGAs) in northern Nigeria in 2012-2014.

    Malaria Consortium emails, November 23, 2016 (unpublished).

  • ACCESS-SMC:

    For more details on the ACCESS-SMC program, see this published study. ACCESS-SMC stands for Achieving Catalytic Expansion of SMC in the Sahel.

    Unitaid awarded up to $67 million to Malaria Consortium to lead a project called ACCESS-SMC to reach up to 7 million children per year in seven countries in the Sahel region of Africa in 2015-2017.
  • You can see this working correctly on our site. It is currently footnote 59 at https://www.givewell.org/charities/malaria-consortium

    Here is the output of the coverted text, which has three problems:
    The @...@ delimiters are still there but do not work;
    The space at start and end are converted to

    tags in 4.x and not in 3.x;
    The HTML entities would be a nightmare for content editors to enter, since they create raw HTML.

    <ul>
    <li>"Budget: 1,694,339.00 (USD)" @Malaria Consortium, "Support Scale up of Seasonal Malaria Chemoprevention (SMC)"@. We also searched the Gates Foundation's grant database to see whether it made any additional grants to Malaria Consortium for SMC work, but only saw this grant (grant page available at @Gates Foundation, "Malaria Consortium"@).
    <li>"Malaria Consortium is implementing and assessing the feasibility of a community-based seasonal malaria chemoprevention (SMC) project in Katsina state, northern Nigeria, with funding from the Bill & Melinda Gates Foundation. Following new World Health Organisation policy recommendations on SMC, this project administers full antimalarial treatments during the malaria season in areas with highly seasonal malaria transmission, to prevent illness among children under five." @Malaria Consortium, Project Brief: Seasonal malaria chemoprevention, Katsina@, Pg 1.
    <li>"The project’s objectives are:<ul>
    <li>To design, in consultation with key local stakeholders, an appropriate community-based delivery system for SMC in Katsina state based on formative research, which will review aspects relating to feasibility, community acceptability, effectiveness and cost
    <li>To launch and execute SMC delivery according to the selected delivery system and collect data on process indicators and costs
    <li>To evaluate community acceptability, costs and effectiveness of the delivery system for SMC
    <li>To inform future national and state plans for SMC continuation/ scale up by disseminating findings and sharing experiences with key stakeholders" @Malaria Consortium, Project Brief: Seasonal malaria chemoprevention, Katsina@, Pg 2.
    </ul>
    <li>It appears that this project may have also been related to another major (&pound;89 million) project that Malaria Consortium was working on in Nigeria called "Support to National Malaria Programme (SuNMaP)".
    <ul>
    <li>"Support to National Malaria Programme (SuNMaP) is an &pound;89 million UK aid funded project that works with the government and people of Nigeria to strengthen the national effort to control malaria. The programme began in April 2008 and [ended] in March 2016.

    Led by Malaria Consortium, SuNMaP was jointly managed by a consortium, including lead partners Health Partners International and GRID Consulting, with nine other implementing partners. SuNMaP was implemented in 10 states across Nigeria, including Anambra, Kano, Niger, Katsina, Ogun, Lagos, Jigawa, Enugu, Kaduna and Yobe.

    SuNMaP worked with the Nigerian government's National Malaria Elimination Programme (NMEP) to harmonise donor efforts and funding agencies around national policies and plans for malaria control. Project targets were aligned with the National Malaria Strategic Plan and Global Malaria Action Plan. The project aimed to improve national, state and local government level capacity for the prevention and treatment of malaria." @Malaria Consortium, SuNMaP Final Report@, Pg 38.
    <li>"July 2013: Result of SuNMaP study on efficacy of sulphadoxine‐pyrimethamine (SP) for intermittent treatment against malaria in pregnancy published. SuNMaP commences seasonal malaria chemoprevention in Katsina State." @Malaria Consortium, SuNMaP Final Report@, Pg 16.
    </ul>
    </ul>

    ">

    On the same page, footnote 81 (and many others) have a real apostrophe in "Consortium’s" which is not converted by the drush command. Enter one of those in a footnote when using version 4.x, and that footnote (sometimes all foonotes) break.

  • 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)

    See https://www.drupal.org/project/footnotes/issues/3414604#comment-15397446 🐛 Support adding the text content within the element Fixed

  • Status changed to Active 11 months ago
  • 🇬🇧United Kingdom scott_euser

    Thanks for the details. It's certainly not stable yet so there is no commitment to breaking changes in 4x - therefore it is fine and makes sense to as closely as possible match 3x output (while still fixing the various big issues that 3x could never solve like grouping/ama support/wysiwyg support within source, accessibility).

    Will work on this as soon as I can. Really appreciate you taking the time to thoroughly test out 4x!

  • 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)

    I am grateful that you are so responsive. A look around our content heavy site will show many examples of complex footnotes. Whether we should use a WYSIWYG is an open question, but if Drupal works without one, Footnotes ideally should too.

  • 🇬🇧United Kingdom scott_euser

    First thought is probably the simplest solution is to support putting content within <footenotes data-value="5">source test here<footnotes/> rather than only supporting data-text. Then perhaps upgrade path can accept as an arg where you want to move the source text to, defaulting to data-text since I would guess the majority of sites use wysiwyg vs not (though I have no data to back that up).

    To note it probably does need to be data-value and not value as noted in 🐛 Data loss: everything before last colon in every footnote is lost when using instead of [fn] syntax Needs work , otherwise it seems some characters cause significant issues.

    Will have a bit more of a think about it, and of course also happy to hear your suggestions / opinion.

  • Status changed to Needs review 11 months ago
  • 🇬🇧United Kingdom scott_euser

    This does not support converting from plain text to CK Editor 5 based text format though. Perhaps that can be a follow-up as its maybe more of an edge case. Can you check if this MR works for you @John_B?

  • 🇬🇧United Kingdom scott_euser

    Updated issue summary

  • Status changed to Fixed 11 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024