• I’ve upgraded to WP 5.0.2 and I’m encountering problems with the new Gutenberg editor. When I try to add post tags, the tags just randomly disappear when adding them. Only 2 tags get saved and it seems to be random what tags get saved and what tags don’t

    Using the Troubleshooting mode on the Health Check plugin doesn’t seem to help either. All plugins and themes have been disabled in this mode and still the block editor comes up with the same problems. Could this be a serverside issue? Anyone experiencing the same?

Viewing 15 replies - 46 through 60 (of 73 total)
  • zionthelion73

    (@zionthelion73)

    Maybe is some tag cache

    plagiarismtoday

    (@plagiarismtoday)

    Ok, I have another wrinkle here. This might help some.

    What I tried was typing a tag (or rather starting one), letting it autosuggest, and then deleting what I typed. Lather, rinse, repeat for about 10 tags. On the server-side, I’m seeing the EXACT same issue.

    This problem isn’t about WRITING tags, it’s about something in the tag recommendation process. I also don’t see the issue with deleting tags.

    This also explains why working within the quick edit doesn’t cause the problem, there’s no tag recommendation. Is there any way to disable tag recommendation in Gutenberg? It isn’t very helpful to me anyway.

    I’d also disable the tag auto-complete in Gutenberg if possible to fix the issue. But it’s weird that you say that, @plagiarismtoday, as I do see a similar feature in the quick editor; it does auto-complete tags for me, but it doesn’t show any of the issues that we’re seeing in Gutenberg.

    plagiarismtoday

    (@plagiarismtoday)

    @rfischmann You’re right. I guess I just type so fast I never see it. On mine, it takes a good bit to pop up. I did the same experiment there (adding, letting autofill kick in and deleting tags) without any server load or performance issues.

    Something is different about the query for the tag preview in Gutenberg than the one in quick edit. Find out what’s different, I think you’ve solved your problem. Sounds like I may be able to get help from my girlfriend here, she’s a database administrator.

    Now that we know what to look at and compare, if it’s a database issue, she may be able to help diagnose. Will see if we have time over the weekend.

    ddrager

    (@ddrager)

    Hey guys, I have some good (or maybe bad news), I think I know what is causing this problem. It likely only occurs on sites with a large number of tags.

    When you start typing, for example let’s say you want to add “android” as a tag:

    1. Type a, Gutenberg sends request to fetch all tags with “a” in them.
    2. Type an, Gutenberg sends request to fetch all tags with “an” in them. Request 1 continues.
    3. Type and, Gutenberg sends request to fetch all tags with “and” in them. Request 1 and 2 are still occurring.

    Each request fetches 100 tags at a time. If you have 5,000 tags, and 3100 of them has “a” in it, it sends a request for 32 pages of tags.

    You can see the network log of requests here:

    View post on imgur.com

    In this log, you can see there are actually 3 simultaneous requests, one for “a”, “and”, and “android”. The “a” request causes the most problems as it is 32 pages of json requests.

    My blog had 13k tags, after trimming tags to 5k (by eliminating tags with 1 post, for example), the problem is a little better, but our editors are still having problems adding tags in the Gutenberg editor.

    To fix this problem, I would recommend increasing the page size for blogs with large number of tags, cancelling the old request once a new character is typed into the tags box, or only fetch tags when a minimum of characters is typed.

    That’s some great analysis there, @ddrager, thanks. I hope it does help the WordPress’ devs solve this issue for us with large tag databases.

    Are “WordPress devs” working on a fix for this? This thread is well over a year old. I guess this is the same as my related bug bear…. I have a pre-formatted set of tags that I add to every post, and it used to be the case that I was able to copy and paste that comma-separated list into the tags box and hit enter to save them all. Now if I do this everything appears in the tag list but then disappears as soon as I hit enter or comma.

    @bob447 Sadly. No. They popped in elsewhere in this thread and basically said they don’t see it as a problem. Even with @ddrager great analysis, I doubt we’re getting a fix.

    I’d be happy with a plugin that just disables the tag preview feature in Gutenberg or one that brought over the tag editor preview from the Quick Edit function, which doesn’t have the same problem.

    To that last editors replies, around the number of tags VS the number of requests:
    I created a bug on the bug tracker of Gutenberg, seems like it is separate from WP.

    https://github.com/WordPress/gutenberg/issues/20734

    I was in the same situation as @ddrager, @rfischmann, @plagiarismtoday and @bob447 amongst others.

    I already have a contributor commenting on possible solution. In the meantime I am trying to AT LEAST have the React components doing the Autocomplete to be set at minLenght:2 OR to cancel the following requests (perpage:100).

    Sidenote, I would not recommend increasing the page size for blogs…as this might just be kicking the can down the road. A contributor suggested infinite scrolling or the tags list, that would be a great idea IMHO.

    This is still an issue on WordPress 5.5.

    @mgrenierfarmmedia That hasn’t yet been merged to Gutenberg, right? It’s such a bad issue for me…

    Nope.

    My branch works perfectly, limited the AJAX call to 1 per search (blur event, after 3 character entered) and did put a minLenght to 3 characters. But the Merge request (https://github.com/WordPress/gutenberg/pull/23841) is still on going. I’m struggling to get this approved.

    I pushed a new fix 2 days ago, both dev checking it are like “Sure, good, but change a constant there”. We’re in the fine tuning phase I think.

    I too would like to see this go live. This is a major problem to us, and probably our last one.

    Well, at least there’s some hope now. Thanks a lot!

    @mgrenierfarmmedia Wouldn’t there be a way for me to apply a manual hot-fix for this? Or does it mess with many Gutenberg files?

    @mgrenierfarmmedia I’m not a PHP expert, but I understand I could make these same changes to my local installation as a hot-fix? Cheers!

Viewing 15 replies - 46 through 60 (of 73 total)
  • The topic ‘Gutenberg: Tags disappear on entry’ is closed to new replies.