Skip to content

First footnote displays as a black line with no number #2634

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

Closed
2 tasks
jacksleight opened this issue Jul 22, 2024 · 0 comments · Fixed by #2635
Closed
2 tasks

First footnote displays as a black line with no number #2634

jacksleight opened this issue Jul 22, 2024 · 0 comments · Fixed by #2635
Milestone

Comments

@jacksleight
Copy link
Contributor

jacksleight commented Jul 22, 2024

Describe the bug and add attachments

When adding footnotes the first one always displays as a black line with no number in the resulting OOXML document.

This is definitely the footnote and not a duplication of the short dividing line above it, if you open the document in Word and then delete the footnote reference the black line disappears from the footer, and adding a new footnote at the same position works correctly:

Screenshot 2024-07-22 at 18 02 45

Example Document

Expected behavior

The first footnote should display correctly with the right text and number:

Screenshot 2024-07-22 at 18 05 38

Steps to reproduce

Here's the test code I'm using:

$word = new PhpWord();

$section = $word->addSection();

$textrun = $section->addTextRun();
$textrun->addText('Some text');

$fn1 = $textrun->addFootnote();
$fn1->addText('First footnote');

$textrun->addText('some more text');

$fn2 = $textrun->addFootnote();
$fn2->addText('Second footnote')

$word->save('...', 'Word2007';;

PHPWord version(s) where the bug happened

1.2.0

PHP version(s) where the bug happened

8.3.9

Priority

  • I want to crowdfund the bug fix (with @algora-io) and fund a community developer.
  • I want to pay the bug fix and fund a maintainer for that. (Contact @Progi1984)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants