Gutenberg: Tags constantly disappear in new posts

Created on 10 Jan 2019  Â·  21Comments  Â·  Source: WordPress/gutenberg

Describe the bug
When adding tags into the box, they appear, then randomly disappear from the box. They don't save unless they then reappear. Which has happened on occasion.
There's also no frequently used tags option which was vital to my work in the classic editor.
Using latest Gutenberg Version

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'New Post'
  2. Click on 'Tags box, write in a tag and use either a comma or enter to add the tag'
  3. Tag(s) will disappear. Sometimes will reappear with no consistency or pattern.
  4. Most recent article I wrote was about subculture aesthetics in The Flash tv series. I used at least 10 tags which were previously unused, so had to be manually input. It only registered one.
  5. I can go into All Posts, select my article and use the Quick Edit to add tags. But I shouldn't have to.

Expected behavior
When tags are entered they should be saved to the post and not simply disappear.
Frequently Used tags would be extremely beneficial to the system.

Screenshots
Sadly this is not something I can screenshot and don't have a video screen capture.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version Up to date

Additional context

  • Please add the version of Gutenberg you are using in the description.
  • To report a security issue, please visit the WordPress HackerOne program: https://hackerone.com/wordpress.
Needs Dev [Feature] Document Settings [Type] Bug [Type] Performance

Most helpful comment

Here are my findings:

  1. When a tag is searched, the search is paginated. Each time you type something, it queries for first 100 tags that would match. Ones the result is received in JS, a request is sent for page 2 and so on untill there are no pages. So, if you have few thousand tags, it can send out 30-40 requests.
  2. The autocomplete is throttled instead of denounced. So the first character you type, sends one bunch of requests and after you complete typing it sends another bunch.
  3. If you clear what you typed, it even searches for empty string sending N number of requests. N = (number of tags)/100.

The issue of tags disappearing happens because: Each new tag you insert is posted for insertion on the database. If it already exists, an error is returned and the tag is than looked up by another query. If there are too many pending queries in queue(bandwidth limitation), these two queries can stay in the queue for a while until the previous autocomplete queries finish.
That many requests for 20 autocomplete suggestions seem unreasonable.

ezgif-1-5988859cc33b

All 21 comments

What theme are you using? Also, are there any plugins installed that might hook into the tags feature?

I'm using a third party theme called Titan. It is quite old and we are moving over to a new one, but haven't got it formatted yet. I don' think we have a plug in that uses tags as we've always used the Wordpress built in feature which has worked perfectly.

One test might be to switch to another theme and try to recreate the
problem. Or if that doesn't work try deactivating plugins one by one and
seeing if it gets fixed. I know that is a very tech support type answer
(did you try turning in off and back on again?) but it sounds to me like it
might be a theme/plugin issue, just by what you described.

On Sun, Jan 13, 2019 at 3:54 AM moriartyviccar notifications@github.com
wrote:

I'm using a third party theme called Titan. It is quite old and we are
moving over to a new one, but haven't got it formatted yet. I don' think we
have a plug in that uses tags as we've always used the Wordpress built in
feature which has worked perfectly.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/WordPress/gutenberg/issues/13282#issuecomment-453823420,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARYZGztzCj7uENDwRpr0f4I0btck6D3eks5vCx56gaJpZM4Z6e6x
.

--

  • James Hamann

Web Developer
United Way of King County
206-496-7825

Also according to this post:

https://wordpress.org/support/topic/my-tags-disappear-after-i-typed-it/

Turning on script debugging in your wp-config.php file might help.

Thank you so much for this, it looks like it was the Debug issue so far, but I'll go the route of disabling everything if it turns out not, in the long run. :)

Any news on adding the Most used tags option again?

I don't work for the Gutenberg team or anything so I have no idea about that feature but I am looking to contribute, so maybe I'll try starting there! Also, do you see any new console errors after turning on the debug feature? It'd be interesting to see what javascript errors are being thrown, that might give a clue as to why the tag feature wasn't working before. I'd try opening your dev tools and the console then adding a tag and see what shows up.

Glad it helped!

Ahh sorry, I thought you were staff or might know :) I'll keep an eye out for it. Seems the problem has reappeared now, so I'm going to try the theme idea :)

I've changed the theme back as that wasn't it. I've just disabled all plug ins and it's still doing it. It seems to cope if they're not entered at a fast rate. Without the Most Used system, I type them in fast as I don't have the time to do it slowly. I had to change that text in wp-config back to false because I kept getting this:

Warning: mysqli_real_connect(): (42000/1203): User steampv6_wo2725 already has more than 'max_user_connections' active connections in /home2/steampv6/public_html/wp-includes/wp-db.php on line 1531

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home2/steampv6/public_html/wp-includes/wp-db.php on line 1562

Warning: mysql_connect(): User steampv6_wo2725 already has more than 'max_user_connections' active connections in /home2/steampv6/public_html/wp-includes/wp-db.php on line 1562
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

This constantly happens to me as well, with multiple themes and plugins setups. The slower the site, the more often it seems to happen. When writing a new post, I am now used to typing the same tags over and over again until it eventually sticks.

Here is how it usually looks (this is on a single site running WP 5.1.1, PHP 7.3, without any plugins installed except for Gutenberg v. 5.5.0, and with the Twenty Nineteen theme).

https://videopress.com/v/CRyHkuAw

+1! This happens to me as well. I do not have a video at the moment, but has happened with various installs:

  • Locally
  • WordPress install on Pressable
  • On WordPress.com

Noticed on Google Chrome Version 74.0.3729.131 (Official Build) (64-bit) with macOS 10.14.4 - Mac OS Mojave.

Here are my findings:

  1. When a tag is searched, the search is paginated. Each time you type something, it queries for first 100 tags that would match. Ones the result is received in JS, a request is sent for page 2 and so on untill there are no pages. So, if you have few thousand tags, it can send out 30-40 requests.
  2. The autocomplete is throttled instead of denounced. So the first character you type, sends one bunch of requests and after you complete typing it sends another bunch.
  3. If you clear what you typed, it even searches for empty string sending N number of requests. N = (number of tags)/100.

The issue of tags disappearing happens because: Each new tag you insert is posted for insertion on the database. If it already exists, an error is returned and the tag is than looked up by another query. If there are too many pending queries in queue(bandwidth limitation), these two queries can stay in the queue for a while until the previous autocomplete queries finish.
That many requests for 20 autocomplete suggestions seem unreasonable.

ezgif-1-5988859cc33b

Hallo,
A part for the Quick Edit option which was already mentioned above I noticed than it works just fine if the TAG was already inserted in the POST-TAG page from scratch.
Apparently when you edit a NEW TAG in the post itself it saves the NEW TAG in some sort of cache but it DOES NOTupdate the TAG DB list.
So if you even try to recover the previous NEW TAG typing it from the “Add New Tag” field and you can find it but even if you select with keyboard or mouse It will not be saved. It seems that is recovered from some temporary cache. Use save option to verify it (CTRL-S).
The only way is to create it from scratch from the POST-TAG page and then recall it from the “Add New Tag” field.
I think this solution is quicker then the Quick Edit solution even is not a on-the-fly method to create and save a TAG within a post.

WP Version 5.2.3

Playing whack-a-mole with disappearing tags when editing posts is maddening. This happens to me with 2017 theme.

This issue is still ongoing on WordPress 5.3.2 and it has been since the addition of the new Gutenberg editor.

Confirmation that this issue is is still occurring, and is a real issue for users. Is anything being done to address the issue in an upcoming release? It happens with all themes, including default WordPress themes, and all plugins deactivated.

I migrated my website to a new host, resulting in a lower loading time for the website. This seems to have addressed the issue. The two websites that remain on my previous host still exhibit the tags-disappearing issue.

Changing the labels here to get a bit more attention. Here's a GIF of me replicating using WordPress 5.5.1 and Gutenberg 9.0 on a very low volume, high performance site:

tags

UPDATE: deleted autoresponder comments to keep this issue clean and up to date.

Hello, just chiming in to say I'm also having this issue on our site because we have a huge number of tags. Any help would be appreciated.

Noting I've seen this issue as well and another user seems to be complaining about it here:
https://wordpress.com/forums/topic/how-do-i-set-classic-editor-to-the-default/

Here's what I'm seeing on a test site on WordPress.com. If I'm adding new tags, the tag appears, disappears, and then reappears. I'm using commas to separate and am not using the the mouse.

taggy trouble

-- Please reply above this line --

Thanks so much for contacting us.

The office is now closed for our holidays and we will return on 03
November 2020.
 
We are grateful for your patience and will be back in touch as soon as
possible on our return. 

If your message is an ABSOLUTE EMERGENCY then you can email
[email protected] Please do not abuse this service - it is
provided on trust and we will only respond to a truly genuine
emergency request. All other messages we will of course respond to
promptly from 03 November when our usual swift replies will
resume.  

We ask that you respect our holiday period.

Thanks again for contacting us. 

Andrew ">Ardel Media Limited is a company registered in England
(company number 09518001).
Registered address:  Ardel Media Ltd, c/o Switch Accountants, Unit
21, City West Business Park, Meadowfield, Co Durham, DH7 8ER, England.

--- End of message.

Was this page helpful?
0 / 5 - 0 ratings