{"id":2818668,"date":"2012-06-15T08:04:04","date_gmt":"2012-06-15T08:04:04","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/some-attachments-dont-get-displayed-after-upgrading\/"},"modified":"2016-08-20T12:57:37","modified_gmt":"2016-08-20T12:57:37","slug":"some-attachments-dont-get-displayed-after-upgrading","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/some-attachments-dont-get-displayed-after-upgrading\/","title":{"rendered":"Some attachments don&#039;t get displayed after upgrading"},"content":{"rendered":"<p>Hello.<\/p>\n<p>I&#8217;ve written a plugin that basically allows people to post their own YouTube videos. As a post thumbnail, plugin was supposed to get the YouTube video thumbnail, put it on the server, register it into wordpress as an attachment, and then set the attachment as post&#8217;s thumbnail. And it worked like a charm, but in version 3.3.2.<\/p>\n<p>After upgrading to 3.4 some weird things started to happen. For some reason, WordPress refuses to display these &#8220;downloaded&#8221; attachments. They are on the server in the correct directory, the URL of file is fine. They used to work in the previous version. I can go to &#8220;Media&#8221; page of admin panel, edit these images (where they get displayed correctly, I can rotate and stuff) though they won&#8217;t save.<\/p>\n<p><a href=\"http:\/\/dl.dropbox.com\/u\/40331962\/zalaczniki.jpg\">Here&#8217;s how it looks in the admin panel (green &#8211; working attachments, red &#8211; not working ones, from submitted YouTube vids)<\/a><\/p>\n<p>I have set up a clean wordpress install, here are the &#8220;live&#8221; examples of attachments:<\/p>\n<p>Not working one &#8211; http:\/\/gct.lh.pl\/wordpress\/?attachment_id=23 (that link next to publish date &#8211; <strong>480 \u00d7 360<\/strong> &#8211; will take you straight to the image file on the server)<\/p>\n<p>Working one &#8211; http:\/\/gct.lh.pl\/wordpress\/?attachment_id=17 this one was uploaded in old-fashioned style, using wp_handle_upload (the plugin also allows to upload images and that is working fine).<\/p>\n<p>Here&#8217;s the code that I use to download YouTube thumbnail and save it as an attachment &#8211; http:\/\/wklej.to\/J9gHL\/html . I&#8217;d like to note, that CHMODs are fine, 644, as all the attachments.<\/p>\n<p>And here&#8217;s how these attachments &#8220;look&#8221; in the database &#8211; http:\/\/dl.dropbox.com\/u\/40331962\/posts.txt first one doesn&#8217;t work, second one is the working one.<\/p>\n<p>I appropriate any help, I&#8217;m out of ideas what&#8217;s wrong.<\/p>\n","protected":false},"template":"","class_list":["post-2818668","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/2818668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/2818668\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=2818668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}