Support » Fixing WordPress » Gutenberg: Tags disappear on entry

  • 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 13 replies - 61 through 73 (of 73 total)
  • I am a Web Dev, working as one. But I am not pretty advanced in React itself, which Gutenberg is built mostly with.

    There is some PHP around it, but most of Gutenberg is built over React, which is a JavaScript Library.

    I checked to see if I could build a plugin on the side, that would change the query param, but to no avail. It might be because I know not enough in React, or because I gave upjust too soon. I thought the fix should be core first, since it was an error in implementation, not a “feature” or “improvement” my situation called for.

    Calling for infinite (all) tags is an error if you are to display/offer only 20.

    I still do not think we could inject ourselves into Gutenberg query param easily, I did try, but did not achieve it.

    To note: I am specialized in server side language, not frontend.

    @mgrenierfarmmedia Sorry, I didn’t notice that was a JS and not a PHP file.

    And yes, I completely agree with you that this isn’t a good case for a plugin. It should be fixed in core.

    So the changes you’ve made here aren’t yet enough to solve the issue? I wouldn’t be able to manually apply them here, right?

    You could apply them at your install, but I would not advise you so. I am trying to escalate this so it gets merged before end of September.

    @mgrenierfarmmedia Yeah, I’ve already gave up on that idea. The file you’ve edited doesn’t even exist in WordPress itself, it seems to me it’s inside a bigger editor.js file together with others. I thought it would be something simple to do, but I’ll just wait then. Thanks!

    I had this problem where I was entering tags on my posts and they kept disappearing when I hit publish. None of my tags were getting saved like the op said in his/her case. My issue however started when i upgraded to the latest version some 2 weeks ago, and the problem has been there since. I however got to fix my problem by checking the db tables, deleting duplicate IDs, allowing increments on 3 tables which for some reason had been disabled. The other thing I did was to drop wp-term-taxonomy and wp-term-relationships and then imported the two from an older backup before i had upgraded the wordpress. I don’t know the explanation to that but it seemed to fix everything and I can now add the tags normally.

    My site has less than 1,000 tags though.

    My situation may have been different, but I guess it would be worth trying for someone who hasn’t done this.

    By the way @rfischmann,

    The Merge request was approved and merged. It should go live with version Gutenberg 8.9.

    Gutenberg is now at version 9.0 on their own plugin install. I tested and the plugin DOES hold my change and works.

    Although, it seems like WordPress itself does not load the full latest Gutenberg. WP Team seems to pick what should go core and what shouldn’t. I do not know when/if this will exactly be available in WP Core. My changes are not in the latest version (Sept 1)

    For now, you should be able to add the Gutenberg plugin and have the changes working.

    Thanks for updating me on this, @mgrenierfarmmedia! I did try 8.9 last week, but it had a PHP error bug related to users on WordPress’ editor role, so I’ve disabled it. I’m trying 9.0 now, first impressions are good!

    Congrats on your work.

    Well, I’m pretty sure since I’m not a programmer that there’s any way I can find a fix for this problem. My tags aren’t publishing either. Darn. Just when I was getting to enjoy using the blocks… I’m assuming that WordPress folks haven’t figured out a solution for this. Annoying.

    I hate to be the party pooper but I installed Gutenberg 9.0 and the issue is still happening on my end. I’m not sure, but maybe I just have too many tags even with the reduced autofill.

    @plagiarismtoday I feel it got better on my side, but I still much rather fill tags using the quick editor without auto-completion.

    Actually the mod by @mgrenierfarmmedia made the Gutenberg auto-complete better and faster, and doesn’t take a toll on my server’s CPU so much anymore, but the issue of tags disappearing persists if I type them quickly, separating them with commas.

    So yeah, it still very much sucks.

    @rfischmann Yeah, that’s my impression too. I’m a fast typist (120 WPM) and I know my tags well so I can blow through my first five or six tags very quickly. They seem to blink in and out of existence as the server plays catch up.

    I think it’s probably the combination of fast typist, large site (4K+ posts, 7K+ tags) and my general impatience that’s causing the problem. I don’t know if there’s a way to fix that AND have any autocomplete.

    @plagiarismtoday I don’t know my WPM score, but I’m a fast typist too.

    My site has 60K posts and 58K tags, so you’re good. 😛

    My first idea to solve the issue, if @mgrenierfarmmedia can try helping again, would be for Gutenberg to “cancel/ignore” the auto-complete behavior as soon as the user finishes typing the tag and press comma — then it would insert the tag as is and move on.

    Hi, we ran into this problem, and just could not believe that it is open for 2 years. I’ve read quite a few comments on github issues regarding this, and must say that can agree on some issues why this is postponed so long. Anyway, we are depending on the open source software, so either we get our hands dirty and help, or wait for someone else to do it 😛

    As the real solution is pretty complex, after some research I’ve came up with sort of a hack. The endpoint, being RESTful, is sending data about pagination in headers, so the solution to change headers seemed appropriate for our needs. Effectively, with this hack, we are only stopping the gutenberg core component used for scrolling pages via api to scroll all pages for chosen endpoint(s).
    Since the only (real) problem with this (auto) loading occurs when you have A LOT of tags in database, intercepting headers only for tags endpoint did the trick for us.

    add_filter('rest_post_dispatch', 'testApi2', 5, 3);
    function testApi2(WP_HTTP_Response $wpResponse, WP_REST_Server $wpServer,  WP_REST_Request $wpRequest) {
        if ($wpRequest->get_route() === '/wp/v2/tags') {
            $wpResponse->headers['X-WP-Total'] = 100;
            $wpResponse->headers['X-WP-TotalPages'] = 1;
            $wpResponse->headers['Link'] = '';
        return $wpResponse;
Viewing 13 replies - 61 through 73 (of 73 total)
  • The topic ‘Gutenberg: Tags disappear on entry’ is closed to new replies.