-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Featured Image sporadically missing from admin & preferences #55460
Comments
Hi @culturalpolicy - thank you so much for drawing all those threads together. One thing Id be interested to know is whether or not you witness this issue when using one of the bundled themes like TwentyTwentyThree or TwentyTwentyTwo? |
Thanks for reading @jordesign ! :-) If you know generally how/why Featured Image is always the last thing on the page to load, I'd love to know. Yes, but I am only unable to reproduce when ABSOLUTELY nothing else is active other than TwentyTwentyThree (no simple child theme, no plugin of any kind). To be clear, when the conflict is happening, Featured Image can be missing from some pages on the same site under PAGES > edit but not others. The issue will appear randomly in the admin regardless of combination of theme, plugins etc. It's almost as if the wp admin > pages > edit page randomly gives up before it finishes loading every area of the sidebar. I MAY have solved for tonight, but will leave this open a couple days in case the sporadic bug reappears. === See full process of elimination below: TEST 1) To rule out my child theme (which was a child of Frost) I remade it to be a child of TwentyTwentyThree theme with nothing fancy inside other than some custom CSS, theme.json etc. No javascript, no functions (other than post-thumbnails to check). Note: For all tests below I opened 5 content pages of similar content (a jetpack slider and a simple paragraph below) in new tabs from inside the admin > pages > edit > open in new tab. As a test, I went to PAGES then right-clicked > edit > open in new tab on 5 random content pages. When those tabs finished loading, 3 of them did not show the featured image area in right sidebar. The other 2 showed it. But since it's the last thing on the page to load, sometimes Featured Image area might take 2-5 SECONDS for it to load even after the rest of the page has loaded (admin menu, blocks/content, entire right sidebar). It's completely random, it's so wild. I could understand if it never showed up how it would be an open/shut case. But it will show up on some pages and not on others. Even if you refresh the same page in editor sometimes Featured Image area will load in sidebar and sometimes it won't. That's what makes it hard to recreate. TEST 2) Then I activated TwentyTwentyThree (TT3) parent theme and performed the same test opening 5 pages (in wp admin edit windows) in a new tab. Same thing happened. This time 3 showed Featured Image box, 2 did not. TEST 3) Deactivated all plugins (TT3 parent still active). Open 5 edit pages in new tabs. They all show Featured Image this time. I try again. Same. TEST 4) Reactivate Jetpack. Open 5 tabs twice. 1/5 and 2/5 don't show Featured Image. Open a page in editor and click anywhere in the blocks before the page finishes loading. Featured Image area doesn't show up. Remember Featured Image setting is the last part of page to load—this seems to prevent it from finishing its loading. It REALLY seems like it has something to do with how the page loads. The Featured Image area is ALWAYS the last thing to load on the page editor every time (is it truly the last thing in the DOM?) no matter what the theme/child/plugin situation. And sometimes it just doesn't load. Something seems to randomly interrupt it from loading. TEST 5) Drilling into Jetpack settings. In the past people mentioned Photon (now called Image Accelerator) could cause issues with Featured Images. I see I have it turned off anyway. Then I come across this module which is turned off on my site anyway: https://jetpack.com/support/display-featured-images-in-wp-admin-post-list/ CONCLUSION: I will pass all this info along to Automattic/Jetpack team. But I still think it's odd how Featured Image is always the last thing to load on a page, can sometimes load a few seconds after EVERYTHING else, and was loading half the time and not when conflict was reproduced. Twenty Twenty Three is great and all, but having the admin play nice with child themes seems really imperative from a security standpoint so someone can continually get updates to the parent theme while making small customizations in a barebones child theme. @culturalpolicy
|
Update — 5 mins later the issue is happening again with TwentyTwentyThree + Jetpack. Open 10 tabs of pages in editor, and now, Move to Trash + Featured Image don't show up in the last three pages. It really seems it's an issue of those last few things in the DOM not loading. Everything else on the page loads. Why else would it open in 7/10 pages? Deactivate Jetpack and all 10 pages open and Move to Trash & Featured Image display in the sidebar of all. |
Raised it with Jetpack. Stay tuned: https://wordpress.org/support/topic/jetpack-breaking-page-editor/ Fearful they will kick the can to WP and say it's a page load issue :-/ |
Hi, |
Update: Still happens — something to do with Jetpack or how Featured Image area loads last in admin. All previous info applies and see further troubleshooting undertaken here: https://wordpress.org/support/topic/jetpack-breaking-page-editor/ |
I made a video showing what happens. In this example Featured Image option loads but Categories and Tags load much later. Featured Image, Categories, and Tags all seem to load wayyyy last in the WP Admin after everything else has loaded. Sometimes up to 10–20 secs later when everything else had already loaded. Some "admin is too slow" research in forums suggests it possibly having to do with the Rest API (but is that used at all in the back-end?) Note that Featured Image, Categories, and Tags do not even show as options in Preferences dropdown until they are loaded (so it's not merely an issue of them being turned off as many have suggested to people in forums). It should be noted in this example the Categories are related to a CPT but there are no tags. So that doesn't explain why they both load so late. Perhaps someone deeply familiar with the Rest API, the way the DOM is compiled for the Admin loading order, etc can understand or explain why this is happening and what possible fixes are. admin-load-order-480p.mov |
Description
Many posters have mentioned this issue in forums, so I figured I'd create an updated roundup since I'm still getting this issue intermittently in v6.3.2. Sporadically, Featured Image is missing in the WP admin and when this happens does not appear in three dots > preferences > panels > Document settings > featured image. Some pages Featured Image option will show up, others it won't.
It's notable that it's slow to load, and that when it does load, it's one of the last things to load on the page after everything else. Sometimes it finally loads even after the page load indicator in tab stops spinning. But it's ALWAYS the last thing to load on the page. This slow load order occurs even in 2023 theme with all plugins deactivated
Also the fact that other posters mention adding a blank index.php file solves their issue. Adding support to functions for the theme seems unnecessary since this should be automatic in core for block themes. This makes is seem like the core is still preferring classic theme requirements sporadically depending how quickly the page loads and performs all it's checks...? It's as if this will always be a bit buggy until block themes are preferred by core.
Some people mention addressing numbers in theme name, index.php, styles.css, jquery, wp-includes, re-installing core, ruling out themes, plugins, etc). But for me, sometimes it works, sometimes it doesn't.
Links (yes many of these are pre-v6, but the troubleshooting steps are interesting):
https://core.trac.wordpress.org/ticket/52855
https://core.trac.wordpress.org/ticket/55019
https://core.trac.wordpress.org/ticket/54597
https://wordpress.org/support/topic/missing-the-upload-featured-image-option-after-update-the-wp-5-9/
(this one has some really detailed responses:
https://wordpress.org/support/topic/missing-the-upload-featured-image-option-after-update-the-wp-5-9/#post-15303179
https://wordpress.org/support/topic/missing-the-upload-featured-image-option-after-update-the-wp-5-9/#post-15317015
)
https://wordpress.org/support/topic/theme-support-for-post-thumbnails-stopped-working-after-upgrading-to-wp-5-7/
js-related: https://wordpress.org/support/topic/theme-support-for-post-thumbnails-stopped-working-after-upgrading-to-wp-5-7/#post-14164173
numbers in theme folder name: https://wordpress.org/support/topic/theme-support-for-post-thumbnails-stopped-working-after-upgrading-to-wp-5-7/page/2/#post-14217022
https://wordpress.org/support/topic/featured-image-feature-has-vanished/
#45836
https://wordpress.org/support/topic/featured-image-field-not-showing-in-the-admin-panel/
https://wordpress.org/support/topic/no-categories-and-featured-image-can-set/
https://stackoverflow.com/questions/66563202/theme-support-for-post-thumbnails-stopped-working-after-upgrading-to-wordpress-5
https://stackoverflow.com/questions/67423437/featured-image-of-wordpress-doesnt-appear-in-admin/71261080#71261080
and many more!:
https://wordpress.org/search/featured+image+missing/
Step-by-step reproduction instructions
Load order: the other admin items will load in the sidebar, then template switches from "default template" to "pages" (the block theme site editor version of this), "slug" quickly switches to "URL", author loads, move to trash loads, and featured image area loads. Template & Slug visibly switching leads me to believe the core is running thru classic theme checks first, then loading block theme versions of these items. For some reason the block theme version of Featured image is the last thing to load on the page. So if the page load hangs or the page doesn't load completely, Featured Image doesn't show up.
This slow load order occurs even in 2023 theme with all plugins deactivated
Screenshots, screen recording, code snippet
I made a video so everyone can see the order things load here. When Featured Image doesn't load (not shown in this vid), it's as if the last step in this video just doesn't happen.
https://www.dropbox.com/s/axbtsuzed6slhbb/reload-featured-image.mov?dl=0
Environment info
WP 6.3.2
Frost Theme + child theme (very basic mostly just styles.css, theme.json, and a functions.php with only post-thumbnails, mostly exported from create block theme plugin)
Chrome 117
Mac OS 12.7
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: