Skip to content
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 #6677

Closed
anoopranawat opened this issue May 10, 2018 · 4 comments
Closed

featured image #6677

anoopranawat opened this issue May 10, 2018 · 4 comments
Labels
[Feature] Document Settings Document settings experience [Type] Bug An existing feature does not function as intended

Comments

@anoopranawat
Copy link

anoopranawat commented May 10, 2018

No description provided.

@anoopranawat
Copy link
Author

Existing featured image is not loading : https://screenshots.firefox.com/ZBIIDZOEmswRGXvW/localhost

@danielbachhuber danielbachhuber added the [Status] Needs More Info Follow-up required in order to be actionable. label May 10, 2018
@danielbachhuber
Copy link
Member

Hi @anoopranawat,

Thanks for the report. A few follow-up questions:

  • Can you share any debugging you've done?
  • When you look in your Dev Tools, is the featured image request successful or failed? If the latter, can you share the specific response?
  • Does the problem reproduce with all plugins deactivated (except Gutenberg) and Twenty Seventeen enabled?

@t-wright
Copy link

Just trying Gutenberg for the first time and I'm experiencing the same issue. I'm running a multisite install on VVV. Have tried with Twenty Seventeen and all other plugins disabled. Looks like when the feature image is updated, a request is made to http://sitename.test/wp-json/wp/v2/media/86?context=edit. The response I'm getting is:

"<br /> <b>Notice</b>: Undefined index: content in <b>/srv/www/sitename/htdocs/wp-content/plugins/gutenberg/lib/rest-api.php</b> on line <b>260</b><br /> <br /> <b>Notice</b>: Undefined index: content in <b>/srv/www/sitename/htdocs/wp-content/plugins/gutenberg/lib/rest-api.php</b> on line <b>260</b><br /> {"id":86,"date":"2018-05-11T10:51:30","date_gmt":"2018-05-11T00:51:30","guid":{"rendered":"http:\/\/sitename.test\/wp-content\/uploads\/2018\/01\/800x800-2.png","raw":"http:\/\/sitename.test\/wp-content\/uploads\/2018\/01\/800x800-2.png"},"modified":"2018-05-11T10:51:30","modified_gmt":"2018-05-11T00:51:30","slug":"800x800-3","status":"inherit","type":"attachment","link":"http:\/\/sitename.test\/article\/8\/new-york-new-york\/800x800-3\/","title":{"raw":"800x800","rendered":"800&#215;800"},"author":1,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"revisions":null,"permalink_template":"http:\/\/sitename.test\/article\/8\/new-york-new-york\/%postname%\/","description":{"raw":"","rendered":"<p class=\"attachment\"><a href='http:\/\/sitename.test\/wp-content\/uploads\/2018\/01\/800x800-2.png'><img width=\"768\" height=\"768\" src=\"http:\/\/sitename.test\/wp-content\/uploads\/2018\/01\/800x800-2-768x768.png\" class=\"attachment-medium size-medium\" alt=\"\" srcset=\"http:\/\/sitename.test\/wp-content\/uploads\/2018\/01\/800x800-2-768x768.png 768w, http:\/\/sitename.test\/wp-content\/uploads\/2018\/01\/800x800-2-150x150.png 150w, http:\/\/sitename.test\/wp-content\/uploads\/2018\/01\/800x800-2.png 800w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/p>\n"},"caption":{"raw":"","rendered":""},"alt_text":"","media_type":"image","mime_type":"image\/png","media_details":{"width":800,"height":800,"file":"2018\/01\/800x800-2.png","sizes":{"thumbnail":{"file":"800x800-2-150x150.png","width":150,"height":150,"mime_type":"image\/png","source_url":"http:\/\/sitename.test\/wp-content\/uploads\/2018\/01\/800x800-2-150x150.png"},"medium":{"file":"800x800-2-768x768.png","width":768,"height":768,"mime_type":"image\/png","source_url":"http:\/\/sitename.test\/wp-content\/uploads\/2018\/01\/800x800-2-768x768.png"},"full":{"file":"800x800-2.png","width":800,"height":800,"mime_type":"image\/png","source_url":"http:\/\/sitename.test\/wp-content\/uploads\/2018\/01\/800x800-2.png"}},"image_meta":{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0","keywords":[]}},"post":8,"source_url":"http:\/\/sitename.test\/wp-content\/uploads\/2018\/01\/800x800-2.png","_links":{"self":[{"href":"http:\/\/sitename.test\/wp-json\/wp\/v2\/media\/86"}],"collection":[{"href":"http:\/\/sitename.test\/wp-json\/wp\/v2\/media"}],"about":[{"href":"http:\/\/sitename.test\/wp-json\/wp\/v2\/types\/attachment"}],"author":[{"embeddable":true,"href":"http:\/\/sitename.test\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/sitename.test\/wp-json\/wp\/v2\/comments?post=86"}]}}"

Checking that $response_data['content'] exists in gutenberg_add_block_format_to_post_content() does indeed fix the issue.

@danielbachhuber
Copy link
Member

Ah. This is fixed by #6576 for Gutenberg 2.9. You can apply this change locally if you need the fix more immediately.

@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Feature] Document Settings Document settings experience and removed [Status] Needs More Info Follow-up required in order to be actionable. labels Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Document Settings Document settings experience [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants