WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

Last modified 3 months ago

#52488 closed defect (bug) (reported-upstream)

Gutenberg deletes all Tags when they are too many

Reported by: QUEERmdb Owned by:
Milestone: Priority: normal
Severity: major Version: 5.6.1
Component: Editor Keywords:
Focuses: Cc:

Description

I have a problem that only happens with the Gutenberg editor not with the classic editor.

I put tons of tags in a post that suddenly disappeared (the tags). This has not happened to me the first time and only happens to me when I use the Gutenberg editor.

The box with the keywords was suddenly empty. I thought they were just not showing up and added a new one. It is now the only tag on the post.

The revisions obviously only save the content not the tags. So they are useless - in that case.

How can I restore the post's tags?

In Posts> Keywords I see that the new keywords have been saved, but I cannot sort them by date, otherwise I could copy them in individually. But that would only apply to the new tags having no linked post.

So I see the tags or some tags were saved.

Also when I open an old post with many tags with the Gutenberg editor ALL TAGS DISAPPEAR. So I can't add new tags. Only with the Classic editor it works finde.

I wasted hours of my life in finding a solution how to identify all the tags that suddenly disappeared - even with the firefox cache. No way.

Change History (5)

#1 @9primus
4 months ago

Hello ) I reproduced your bug . Large number of tags cause error which you can see in the console. Error says that CMS can not save any more tags into database.

post.php?post=56&action=edit:1 
Uncaught (in promise) 
{code: "db_insert_error", message: "Не удалось вставить элемент в базу данных", data: null}

I will create a patch for this bug

#2 @9primus
4 months ago

Hello ) It seems the long tags will not be saved because there is a limit for database. If you go to wp_terms table of yours database you will see that the name has limit varchart(200) , you change the limit to longtext and the long tags will be saved

#3 follow-up: @skorasaurus
4 months ago

  • Resolution set to reported-upstream
  • Status changed from new to closed

Hi,

Thanks for reporting; sorry that this is a frustration. This has been reported at https://github.com/WordPress/gutenberg/issues/13282 and you can follow its progress there.

@9primus
Thanks for your proposal, however, I don't think you're correct. Yes, the wp_terms table does have a limit of 200 characters, but that is for each tag, not for the sum of all tags.
if each tag is being stored as intended (in its own row), then it should only be several characters long; as an example, see: https://f002.backblazeb2.com/file/cpl-public/tech-devel/2021-02-23-tags.jpg

#4 in reply to: ↑ 3 @9primus
4 months ago

Replying to skorasaurus:
Hi ) thank you for feedback ) if this issue require function that trim each tag and save it I can implement this )

#5 @desrosj
3 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.