Joe Lennon

Rants, Raves & Recommendations

Archive for the ‘twitter’ tag

Twitter for WordPress on 2.7

with one comment

Today, I upgraded my blog to WordPress 2.7, and while most of the upgrade went smoothly, I did notice that my Twitter plugin wasn’t showing new tweets anymore. I initially thought maybe it was a caching issue, or I had run out of API calls or something, but I returned hours later to find it in the same state. I tweaked with the function call to see if changing it would refresh the cache but nothing I tried made it work. I looked for a solution on the official plugin website and on WordPress.org, but none was available, so I decided to try and fix it myself. The following will fix the bug, but it involves turning off the MagPie cache used by the fetch_rss function. I don’t really know what this means, but the cache is likely there for a reason and turning it off is probably not ideal, or recommended. However, this did get my new tweets appearing again, so it will have to do until an official fix is released. If you want to do the same, here is how I did it:

  1. Log in to your WordPress Administration Interface (usually http://www.yoursite.com/wp-admin)
  2. On the navigation bar on the left hand side of the page, click on the Arrow next to Plugins. You should see an expanded submenu.
  3. From this submenu, click on “Editor” to bring up the Plugin Editor
  4. You should now see a large text editor with the code for the first of your plugins showing in it (Akismet in my case). On the right hand side should be a list of plugins. Find “Twitter for WordPress” in this list and click on the link.
  5. You should now be able to edit “twitter.php” in the text editor. Scroll down just below the copyright notice until you find the line:  define('MAGPIE_CACHE_AGE', 120);
  6. Add a new line under this and paste the following: define('MAGPIE_CACHE_ON', false);
  7. Click the “Update” button at the bottom of the page to update the plugin file. That’s it, your twitter plugin should now be showing new tweets once again.

Note: your plugin file will need to be writable in order to perform the above procedure. If it’s not, either make it writable using an FTP client or SSH, or else simply edit the file manually by downloading it with FTP or via SSH. As I said above, this is almost definitely not the best solution to this problem, but one that should make do until an official fix is released by the plugin author.

Written by Joe Lennon

December 13th, 2008 at 1:14 am

Posted in Tutorials,WordPress

Tagged with , , , ,