Categories
WordPress

Twitter oEmbeds broken – A Case for Bug Notifications in WordPress

If you’re using the oEmbed feature in WordPress to display Twitter updates in your posts or pages you may have noticed those nice looking Twitter bubbles have been replaced with a non-functioning link to the Twitter update in the last few days. This is not because your WordPress site is broken but because Twitter changed their API about a week ago thus breaking the feature in every WordPress site worldwide. The core development team has already fixed the problem and the fix was rolled out in the 3.8.1 update which should be hitting your site in an auto update shortly.

What you don’t know can hurt you

Chances are you were not aware of this problem, or if you knew of the problem you did not know the cause. Looking at Twitter and other social media (and my own inbox) it is clear most people automatically attribute Twitter oEmbed not working in their WordPress install to a problem either with WordPress itself or with a theme or plugin. Thus they spend hours trying to sort it out.

This is not the first time a core feature of WordPress has broken due to an external service changing, and it will not be the last. And that’s to be expected. What is not expected from a user perspective is the complete silence from WordPress (core team, people in charge, whatever you want to call it) itself about the issue. And this is one of those unfortunate things that sets open source apart from commercial software:

When something goes wrong there is very little chance you’ll be notified or get an explanation.

This phenomenon is historically valid – Open Source used to be something only a small group of highly motivated people dabbled in – and can be explained by the flat structure free-for-all nature of Open Source in general, but that isn’t an excuse any more. Open Source, and in particular WordPress, is now ubiquitous and most of the users are not highly motivated and prone to dig into the code or search Trac any time something goes wrong.

A Case for Bug Notifications in WordPress

What’s needed is a system through which users are notified when a systemic problem arises. There is already several systems in place that can be used – the update notification bar in admin, and the WordPress News widget on the Dashboard are ideal candidates – but it could also be built as a new feature. This feature should provide up-to-date information about known destructive or feature bugs like Twitter oEmbed not working or the ability to add header images from the Customizer being removed and relevant links with further information and any bug fixes on the books.

For this to work two things have to happen: The system needs to be implemented, and someone needs to be tasked with providing these updates.

A simple update like this would go a long way in reducing frustration and building trust with everyone using WordPress.

</rant>

 

Categories
twitter WordPress

Twitter oEmbeds are not responsive – The little things that bug me

If you have a website using WordPress you should be excited about the new 3.4 release which introduces a whole bunch of new features. For a brief look check out the announcement or you can get an in-depth look at all the newness in the Codex article for the release.

Twitter oEmbeds are here!

One of the many new features is the ability to use oEmbed to add Tweets to your posts. All you have to do is grab the URL to a tweet, for example https://twitter.com/mor10/status/212999553023090688, and paste it into the editor. WordPress finds the URL, figures out it’s from Twitter, and embeds a nice active Tweet window in the post, just like the one you see above. Very cool. Almost.

New technology hampered by old thinking

I have a serious issue with the Twitter oEmbed: Inspecting the code you’ll see the widget comes with a small inline style call:

style="width:500px!important"

This small and unnecessary piece of code makes the Twitter oEmbed awful to work with. As you see from the grab at the very top of the post, the oEmbedded tweet is not responsive. That’s because the width is hardcoded – something that should never happen, especially not inline. What’s worse is that infernal “!important” at the end of the offending piece of inline style code. That !important makes it impossible to use a stylesheet to override the width and make the box responsive.

The Solution (that you can’t apply)

The solution to this problem – one that must be implemented by either Twitter or WordPress (at present I’m not sure where that piece of code is originating) is to change the style code to say:

style="max-width:500px!important"

Oh, and don’t even get me started on the clear:both!important; call. WTF.