{"id":2369,"date":"2018-02-04T15:52:38","date_gmt":"2018-02-04T15:52:38","guid":{"rendered":"http:\/\/www.dpscomputing.com\/blog\/?p=2369"},"modified":"2021-03-01T21:50:56","modified_gmt":"2021-03-01T21:50:56","slug":"twitter-embed-tweet-preview-bug","status":"publish","type":"post","link":"https:\/\/www.dpscomputing.com\/blog\/2018\/02\/04\/twitter-embed-tweet-preview-bug\/","title":{"rendered":"Twitter &#8216;Embed Tweet&#8217; Preview Bug"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"42\" data-permalink=\"https:\/\/www.dpscomputing.com\/blog\/2009\/10\/01\/twitter-used-to-serve-injunction\/twitterlogo\/\" data-orig-file=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2009\/10\/twitterlogo.png\" data-orig-size=\"224,55\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Twitter\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2009\/10\/twitterlogo.png\" data-large-file=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2009\/10\/twitterlogo.png\" tabindex=\"0\" role=\"button\" class=\"alignright size-full wp-image-42\" src=\"http:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2009\/10\/twitterlogo.png\" alt=\"Twitter logo\" width=\"224\" height=\"55\" \/><\/p>\n<p>I know what you&#8217;re thinking &#8211; &#8216;Shut the door, Twitter has a bug&#8217;.<\/p>\n<p>Well yes it does, and we&#8217;ve found it &#8211; but thankfully it&#8217;s not too much of a biggie.<\/p>\n<p>Those who have embedded a tweet, for example, on a website or blog will be familiar with the following screen:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2370\" data-permalink=\"https:\/\/www.dpscomputing.com\/blog\/2018\/02\/04\/twitter-embed-tweet-preview-bug\/twitter-embed-tweet\/\" data-orig-file=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet.jpg\" data-orig-size=\"520,738\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;David Smith&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1517758764&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"twitter-embed-tweet\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-211x300.jpg\" data-large-file=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet.jpg\" tabindex=\"0\" role=\"button\" class=\"size-full wp-image-2370 aligncenter\" src=\"http:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet.jpg\" alt=\"\" width=\"520\" height=\"738\" srcset=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet.jpg 520w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-106x150.jpg 106w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-211x300.jpg 211w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-100x142.jpg 100w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-150x213.jpg 150w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-200x284.jpg 200w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-300x426.jpg 300w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-450x639.jpg 450w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/p>\n<p>All is fine here.<\/p>\n<p>If you&#8217;ve ever embedded a reply to a tweet you&#8217;ll see a similar screen, but with extra options regarding the parent tweet:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2371\" data-permalink=\"https:\/\/www.dpscomputing.com\/blog\/2018\/02\/04\/twitter-embed-tweet-preview-bug\/twitter-embed-tweet-with-parent\/\" data-orig-file=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-with-parent.jpg\" data-orig-size=\"526,906\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;David Smith&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1517759149&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"twitter-embed-tweet-with-parent\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-with-parent-174x300.jpg\" data-large-file=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-with-parent.jpg\" tabindex=\"0\" role=\"button\" class=\"aligncenter size-full wp-image-2371\" src=\"http:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-with-parent.jpg\" alt=\"\" width=\"526\" height=\"906\" srcset=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-with-parent.jpg 526w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-with-parent-87x150.jpg 87w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-with-parent-174x300.jpg 174w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-with-parent-100x172.jpg 100w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-with-parent-150x258.jpg 150w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-with-parent-200x344.jpg 200w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-with-parent-300x517.jpg 300w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-with-parent-450x775.jpg 450w\" sizes=\"auto, (max-width: 526px) 100vw, 526px\" \/><\/p>\n<p>Still, nothing out of place here.<\/p>\n<p>But if you uncheck the &#8216;Include parent Tweet&#8217; checkbox you may notice your browser window getting longer and longer, with the scrollbar getting smaller and smaller.\u00a0 So what&#8217;s behind the page growth?:<\/p>\n<p><a href=\"http:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2372\" data-permalink=\"https:\/\/www.dpscomputing.com\/blog\/2018\/02\/04\/twitter-embed-tweet-preview-bug\/twitter-embed-tweet-parent-preview-duplication-bug\/\" data-orig-file=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug.jpg\" data-orig-size=\"510,916\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;David Smith&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1517759263&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"twitter-embed-tweet-parent-preview-duplication-bug\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug-167x300.jpg\" data-large-file=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug.jpg\" tabindex=\"0\" role=\"button\" class=\"aligncenter size-full wp-image-2372\" src=\"http:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug.jpg\" alt=\"\" width=\"510\" height=\"916\" srcset=\"https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug.jpg 510w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug-84x150.jpg 84w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug-167x300.jpg 167w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug-100x180.jpg 100w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug-150x269.jpg 150w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug-200x359.jpg 200w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug-300x539.jpg 300w, https:\/\/www.dpscomputing.com\/blog\/wp-content\/uploads\/2018\/02\/twitter-embed-tweet-parent-preview-duplication-bug-450x808.jpg 450w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<p>Taking a look at the preview section below, you&#8217;ll notice that the preview isn&#8217;t clearing the previous preview and regenerating it but is instead just tacking it onto the end of the last preview.\u00a0 Hit the checkbox a few more times and you&#8217;ll get a few more.<\/p>\n<p>If you&#8217;re really bored and are looking for something to do &#8211; and in the spirit of full disclosure, yes I did, for a minute or so &#8211; you can keep clicking the &#8216;Include parent Tweet&#8217; checkbox and see how large you can make your browser window without crashing your browser or computer.<\/p>\n<p>It&#8217;s not often we see bugs fly through onto a live site by a company as big as this, but it&#8217;s not impossible.\u00a0 It always goes to show that it doesn&#8217;t matter who you are, you need to QA your code before it goes live to the world!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I know what you&#8217;re thinking &#8211; &#8216;Shut the door, Twitter has a bug&#8217;. Well yes it does, and we&#8217;ve found it &#8211; but thankfully it&#8217;s not too much of a biggie. Those who have&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[8],"tags":[2087,2085,2086,864,2083,2088,2084],"class_list":["post-2369","post","type-post","status-publish","format-standard","hentry","category-news","tag-bug-in-twitter","tag-embed-tweet-bug","tag-embed-tweet-parent-bug","tag-twitter","tag-twitter-bug","tag-twitter-bugs","tag-website-bug"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3nsfA-Cd","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dpscomputing.com\/blog\/wp-json\/wp\/v2\/posts\/2369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dpscomputing.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dpscomputing.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dpscomputing.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dpscomputing.com\/blog\/wp-json\/wp\/v2\/comments?post=2369"}],"version-history":[{"count":2,"href":"https:\/\/www.dpscomputing.com\/blog\/wp-json\/wp\/v2\/posts\/2369\/revisions"}],"predecessor-version":[{"id":3080,"href":"https:\/\/www.dpscomputing.com\/blog\/wp-json\/wp\/v2\/posts\/2369\/revisions\/3080"}],"wp:attachment":[{"href":"https:\/\/www.dpscomputing.com\/blog\/wp-json\/wp\/v2\/media?parent=2369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dpscomputing.com\/blog\/wp-json\/wp\/v2\/categories?post=2369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dpscomputing.com\/blog\/wp-json\/wp\/v2\/tags?post=2369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}