-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor screen is showing content from a different post. #7468
Comments
I'm also having this issues, however if I click on classic edit it the correct content. |
@easilyamused Yes - as in it's the Gutenberg editor that is picking up the wrong ID somehow. ? Out of interest what |
That's what it looks like to me with my debugging. |
@easilyamused Also - are you on a Multisite install of a normal single site? |
Single site, I have a multisite setup using the Gutes, but did not install after this bug popped up. All my settings seem to be the same as your @fredbradley too. |
Can confirm, happening on custom post/page types for me too. The URL parameter shows the correct ID but the actual editor screen shows an different post. It is so random. Even when the correct right content is shown, after one edit and a save the editor shows the wrong post/page. Trying to edit custom page type with ID 3811, and the content of post 9658 is shown. Which is not the first or last ID in tables. *update: now it is happing now standard posts too :/ |
Hi folks, Some follow-up questions:
|
@danielbachhuber I have not checked and I did not try on a fresh Install. However, I do have some new news. This issues does not seam to be a problem in 3.0.1 and before(Have been using the Gutes since the beginning). Today I tried Gutenberg on a site for the first time on a new host and everything seemed fine for the first 9ish hours. I converted 19 pages without any real problems. I even edited some of them too. Was super happy the grid for nested blocks was fixed(not related). Then the problem showed back up. This might seem crazy, but as soon as all pages where Gutenberg pages, the problem showed back up. That last detail could be coincidence. The new site is running the current versions of all core, theme, and plugins. Its on storefront(Woocommerce site, and on a standalone(not the cheap hosting) at GoDaddy. Was messing up on Pantheon when I first reported the issue. Also the classic edit works. When i click on edit, Gutenberg loads but not the right content. We know that from above, but what's weird is that its loading a post not even a page. I will report on a different ticket, but the save seems to be hanging. It will save but the save never stops trying or at lest looking like its trying to save. A refresh seems to work and the saved data is there. I know this is a lot of vague info and happy to provide more if I know what was needed. |
Same issue here on one of my sites in german language. WP 5.0-alpha-43406 with Gutenberg Version 3.2.0. It is not really a random post id selected. For me just one category of posts have this strange behavior. To explain in Details: I have 9 posts in category&tag_ID=35 with a unique Name. Editing each posts lead for 8 of these to the post with one specific id. Editing the post with that specific id leads to on other post from category 35. The adress-path is correct and if i add &classic-editor at the and of the addres the correct article is opened. As it was strange for me, that this happens only to that specific category, i disabled all other plugins and where finally able to find the plugin that causes this error on my page: List category posts https://de.wordpress.org/plugins/list-category-posts/ I've submitted this also to creator of LCP picandocodigo/List-Category-Posts#320 This is really freaky... |
After more research, and looking at ticket #7833, it seems to be related to posts with shortcodes that query other post content. Pages with out shortcodes work fine. I have not debug different types of shortcode yet. The live page is https://www.freshfarmscbd.com/. The case studies is a blog category. |
'List Category Posts' did issue an update last night to the plugin. Error caused by that Plugin seems now to be fixed. |
Can confirm I'm experiencing the same error. For me, it occurs only when the plugin Display Posts Shortcode is active, and the post I want to edit with Gutenberg contains a display posts shortcode. |
I believe this is related to a bug in WP where wp_reset_postdata() doesn't work in the backend (WP core ticket #18408). Is Gutenberg running the shortcodes to generate a preview? I think this should be something that is addressed in WordPress core, but Gutenberg could probably work around it by manually resetting the post data after shortcode previews are complete. |
Gutenberg runs shortcodes when it calls https://core.trac.wordpress.org/ticket/18408 seems like it'd be the cause of the problem. If the shortcode sets up the global |
I've got a fix in #7889 |
Hi @danielbachhuber , Seeing that you closed my issue and worked on a solution ... As an end user, I don't understand what you are talking about. I'd like to know: Is this issue fixed in the official Gutenberg plugin - can I update to Gutenberg 3.6.2 now or would this issue persist? Thanks Nicole |
Hey @nmschaller, Yes, the issue is fixed in the latest version of Gutenberg. It's been fixed as of Gutenberg 3.3. |
Thanks a lot, @danielbachhuber. |
Describe the bug
My Gutenberg Editor is constantly showing POST ID 9 of my posts table, rather than the
post
in the uri query string.This means I can't actually edit any page with Gutenberg?
To Reproduce
WP 4.9.6. Gutenberg 3.1.0
the primary site of a Multisite, with Custom Post types. (Worth saying that ID 9 is a custom post type, rather than just a post, and not the post type I'm intending to view!)
Click to edit any post of any post type.
Expected behavior
The edit screen of the item you clicked on (and of the item that URI Query string suggests)
Screenshots
Not applicable/private information
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: