-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Bugs with autogenerated heading anchors #36365
Comments
I can reproduce this on gutenberg 11.8.3 |
I ran into exactly this. Emptying the anchor field results in a forced auto-fill with the default anchor name, so I had to insert a random string instead to un-break my site. Thankfully I don't have a lot of headlines in this specific project, because this has the potential to turn into a nightmare fast. |
This functionality should be optional. I don't see any real benefit to forcing anchors on all headings automatically - it's very easy for conflicts to occur on short headings and very messy on long headings. |
Anchors should not be forced on headings, it should be optional. |
I agree that there needs to be a way to turn off the automatic generation of anchors. |
Here's a related Support Forum post on the Heading ID duplication issue as well, confirmed still happening on WP 5.9 RC4 and Gutenberg 12.4.1: https://wordpress.org/support/topic/automated-ids-on-headings-causes-duplicate-id-breaks-validation/#post-15288905 |
Additionally it does not correctly transliterate in all languages. In German for example there are rules for it, like "ü"->"ue", "ä"->"ae", "ö"-> "oe", "ß"->"ss". Found in This seems to be not used for generating the anchor links as my umlauts are lost and I get just "ü"->"u" (and so on) |
Can confirm this bug exists still in WP 5.9, without the Gutenberg plugin active. |
Pasting headings with the same name are not postfixed with a number |
I've encountered an issue where these anchors include any Heading element content: The same text run through the Where is the code that actually adds these? If the text could be run through |
Hey folks! Coming back to this a few years on and wanted to see the status of where this currently stands. From what I can tell using 6.6.1, headings don't have autogenerated anchors as per this #38171. However, this issue remains when duplicating a heading with an anchor: #32970 My instinct is to close this out as a result. I'll leave this open for two more weeks in case folks can chime in with more context. |
Description
I wrote a comment on the feature pull request about a week ago but given it's already a closed pull request it likely got lost.
There's currently some issues with the autogenerated heading anchors that are increasingly frustrating as someone who has been building a website with the latest version of Gutenberg with this feature in place.
Step-by-step reproduction instructions
See above.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: