WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 4 days ago

#53682 new defect (bug)

tags (keywords) with umlauts don't get saved in german locale

Reported by: spielautomat4 Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version: 5.7.2
Component: Editor Keywords: needs-patch
Focuses: administration Cc:

Description

This report is about assigning keywords to an article.

First keyword: "Gärten" with slug "gaerten" (exists already)

Second keyword: "Garten" with slug "garten" (was not created yet)

I tried to apply the new keyword "Garten", but once I saved the article, the keyword "Gärten" was assigned in the preview. I removed it and tried to assign "Garten" once again, but WordPress keeps applying "Gärten" to the article, even though the editor showed "Garten" in the sidebar (as expected).

I then created the keyword "Garten" with slug "garten" manually in the keyword management interface. Now I have both keywords in my database.

But still, when I try to assign "Gärten" in the editor, WordPress keeps changing it to "Garten", once the article is saved and I view the preview. The slugs are different (gaerten vs. garten), but it seems like the editor confuses the German umlauts in Gärten with Garten.

I am using the latest WordPress 5.7.2 and the Classic Editor.

Attachments (4)

Keyword in editor vs. front end.png (17.6 KB) - added by spielautomat4 5 months ago.
Keyword in editor sidebar and article preview
Garten.mp4 (1.4 MB) - added by Presskopp 5 months ago.
Capture d’écran 2021-07-18 à 10.53.42.png (87.6 KB) - added by audrasjb 5 months ago.
Looks good to me using a de_DE installation
German language selected.png (8.5 KB) - added by spielautomat4 5 months ago.
Current language setting (de_DE)

Download all attachments as: .zip

Change History (23)

@spielautomat4
5 months ago

Keyword in editor sidebar and article preview

#1 @spielautomat4
5 months ago

Sorry, mixed up the last paragraph. Should have been:

But still, when I try to assign "Garten" in the editor, WordPress keeps changing it to "Gärten"...

#2 @spielautomat4
5 months ago

BTW: "Garten" is the singular form of "Gärten", so these are two different terms.

#3 @Presskopp
5 months ago

  • Keywords needs-patch added

Bug confirmed (5.8-RC4-51447, de_DE)

To reproduce I added the tag "Garten" and slug "garten" was created (using de_DE locale). Attached this tag to a post. So far so good. Then I tried to add a new tag "Gärten" and it was shown in tag list but after publishing the post it got lost. Deleted tag "garten" so only "gaerten" remained. But after updating the post it went back to slug "garten". See attached video.

Last edited 5 months ago by Presskopp (previous) (diff)

@Presskopp
5 months ago

This ticket was mentioned in Slack in #polyglots by presskopp. View the logs.


5 months ago

This ticket was mentioned in Slack in #core by presskopp. View the logs.


5 months ago

@audrasjb
5 months ago

Looks good to me using a de_DE installation

#7 @audrasjb
5 months ago

  • Keywords reporter-feedback added

I can't reproduce the issue on my side, using a de_DE installation.
Please make sure you really switched languages to de_DE on Settings > General settings.

#8 @audrasjb
5 months ago

Update: I think I reproduced part of the issue.

  • using the block editor and a de_DE installation
  • create a new post tagged gärten + garten (both tags should be created on the fly)
  • publish the post
  • go to Posts > Tags. Result : only gärten is created, with gaerten as a slug. The other tag is not created.

Video recording: https://i.gyazo.com/e8d361911748bf2ed15ab2987ad0153c.mp4

#9 @spielautomat4
5 months ago

@Presskopp: Yep, 53682#comment:3 is how you can reproduce the bug.

@audrasjb: Looks the same as 53682#comment:6 for me, but that's not the issue. WordPress does actually create both keywords with different slugs. Editor acts as expected as well. But once I save the post, the German umlauts get replaced by their dot-less equivalents.

Both, the language on Settings > General and in my profile are set to "Deutsch" (de_DE).

Neither do I use any additional plug-ins, besides the Classic Editor.

Last edited 5 months ago by spielautomat4 (previous) (diff)

@spielautomat4
5 months ago

Current language setting (de_DE)

#10 @spielautomat4
5 months ago

  • Keywords reporter-feedback removed

#11 @Presskopp
5 months ago

  • Summary changed from Keywords Gärten and Garten get confused by editor to tags (keywords) with umlauts don't get saved in german locale

#13 @spielautomat4
3 months ago

This ticket is still awaiting review. Is there anything else I can provide to get this issue fixed?

Unfortunately, I'm not that familiar with WordPress core to fix the bug myself.

#14 @costdev
2 months ago

Testing Report 1 of 2 (Block Editor)

TL;DR

  • Gärten is created with the gaerten slug.
  • Garten is created with the garten slug.
  • No issue to report.

Env

  • WordPress: 5.8
  • PHP: 7.4.18
  • Localhost: WSL2 with Ubuntu 18.04
  • OS: Windows 10
  • Browser: Chrome 93.0.4577.82
  • Theme: Twenty Twenty-One
  • Plugins: None activated
  • Custom scripts: none

Steps to Test

  1. Go to Settings > General.
  2. Set Language to Deutsch.
  3. Click Save Changes.
  4. Go to Beiträge > Erstellen.
  5. Add a Title in Titel hier eingeben.
  6. Copy and paste Gärten, Garten, into the Schlagwörter meta box.
  7. Click Veröffentlichen and then click Veröffentlichen again.
  8. Refresh

Results

  • In the Schlagwörter meta box, both Gärten and Garten appear.
  • In Beiträge > Schlagwörter, Gärten is added with gaerten as its slug.
  • In Beiträge > Schlagwörter, Garten is added with garten as its slug.

Notes

  • The order of Gärten and Garten does not matter when added as tags, the result is the same.

#15 @costdev
2 months ago

Testing Report 2 of 2 (Classic Editor)

TL;DR

  • Gärten is created with the gaerten slug.
  • Garten isn't created.
  • Issue reproduced.
  • Ticket is valid.

Env

  • WordPress: 5.8
  • PHP: 7.4.18
  • Localhost: WSL2 with Ubuntu 18.04
  • OS: Windows 10
  • Browser: Chrome 93.0.4577.82
  • Theme: Twenty Twenty-One
  • Plugins: Classic Editor
  • Custom scripts: none

Steps to Test

  1. Go to Settings > General.
  2. Set Language to Deutsch.
  3. Click Save Changes.
  4. Go to Beiträge > Erstellen.
  5. Add a Title in Titel hier eingeben.
  6. Copy and paste Gärten, Garten, into the Schlagwörter meta box.
  7. Click OK.
  8. Click Veröffentlichen.

Results

  • In the Schlagwörter meta box, only Gärten appears.
  • In Beiträge > Schlagwörter, Gärten is added with gaerten as its slug.
  • In Beiträge > Schlagwörter, Garten is not added.

Notes

  • The order of Gärten and Garten does not matter when added as tags, the result is the same.

#16 @costdev
2 months ago

Pinging Editor Component Maintainers @azaozz, @matveb and @noisysocks to request Milestone.

#17 @audrasjb
2 months ago

  • Milestone changed from Awaiting Review to 5.9

Moving to milestone 5.9

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


4 days ago

#19 @audrasjb
4 days ago

  • Milestone changed from 5.9 to Future Release

Today's beta 1, so let's move this ticket to Future Release.

Note: See TracTickets for help on using tickets.