How to delete application caches in Mac OS X

If you’re struggling with a crashing Mac app or just trying to clean-up the remnants of an uninstalled program, deleting application caches can be a good place to start.

Application caches are used by both native and third-party applications to store temporary information (like a recently visited webpage) and speed up load times. In general, caching is a good thing – it makes applications faster. But sometimes a problem with a piece of cached information or a software bug can have the opposite effect – causing applications to load slowly or even crash.

An example of when you might need to delete an application cache is Google Chrome getting stuck in a re-launch loop. Occasionally, and especially with beta versions of Chrome, the browser will error out on a webpage that is trying to load from the cache. Although it should prompt to ask if you want to try loading the page that’s causing the issue, sometimes this doesn’t happen and the browser gets stuck in a loop. Clearing out the Chrome application cache will often resolve the issue.

Clearing an application cache

OS X stores cashed application data in the ~/Library/Caches folder. If you’re using a pre-Lion version of OS X you can simply browse to this folder in Finder.

From the Finder bar Go –> Library –> Caches will get you where you need to be.

Navigating to the Library Folder

Starting in Lion, Apple chose to hide the Library folder from users. The easiest way to access the Library folder is to click Go on the top Finder bar, hold down the ALT/Option key on your keyboard, and the Library folder should appear as an option in the drop-down list. Click Library, then Caches.

Inside the Caches Folder
The folder for Adium, an instant messaging application, has been highlighted as an example.

Once you’re in the Caches folder, deleting a cache is the same as deleting any other file or folder on OS X. Just drag the cache folder for the application you’re having issues with to the Trash or right click and select the Move To Trash option.

Things to keep in mind

While some advocate clearing out the entire cache folder on a regular basis, this is not generally recommended. Most applications manage their own cache fairly well without user intervention. Although you won’t cause any long-term damage to OS X, deleting caches unnecessarily may cause slow load times until each application rebuilds a new cache.

Caches are meant to be used for temporary, unimportant application data. However, some developers will store preference files in the Caches folder instead of the ~/Library/Preferences/ folder. Although it’s not common practice, if you’re concerned about losing custom application preferences it’s a good idea to check the cache folder you’ve targeted for deletion for .plist files before deleting it.

Fix: WordPress 3.1 and Disqus Plugin Error When Returning Comments Count

If you use the popular 3rd-party commenting system Disqus in your WordPress-powered website, you may have noticed that some errors appeared in your Posts lists after upgrading to WordPress 3.1.  The specific error you see would be something like:

Warning: number_format() expects parameter 1 to be double, string given in /wp-includes/functions.php on line 155

I’ve had problems with Disqus messing with WordPress comment counts in the past, and since those minor problems were never properly resolved, they caused more severe problems when WordPress updated their Posts view in version 3.1.

Essentially, Disqus takes the WordPress comment count and reformats it internally to wrap it in an identifying span that follows the format:


{number of comments}

Disqus effectively usurps WordPress’s comment count (which isn’t a big deal by itself), but the added HTML around the comment count is what breaks WordPress 3.1.

Why It Breaks

In the WordPress core file /wp-admin/includes/class-wp-list-table.php, WordPress makes a call to the get_comments_number() function and passes it to its internal function number_format_i18n().  Since Disqus has replaced the normal value returned from get_comments_number() with its own value wrapped in HTML, this breaks WordPress’s number_format_i18n function which expects the value to be a double instead of a string.

After quite a bit of troubleshooting, I figured out a way to fix this by making a small change to the Disqus plugin.

How to Fix It

Note: This method involves editing PHP files for WordPress plugins on your web server. If you do not feel comfortable following this guide, please seek assistance. And above all – make a backup!

Step 1: Edit the file /wp-content/plugins/disqus-comment-system/disqus.php

Step 2: Locate the following code at line 692:


function dsq_comments_number($count) {
 global $post;

 if ( dsq_can_replace() ) {
 return ''.$count.'';
 } else {
 return $count;
 }
}

Replace it with:


function dsq_comments_number($count) {
global $post;

return $count;
}

Step 4 (optional – this will fix comment counts in the front-end of your blog if using the comments_number() function in your theme): Locate the following code at line 697:


function dsq_comments_text($comment_text) {
global $post;

if ( dsq_can_replace() ) {
return 'View Comments';
} else {
return $comment_text;
}
}

Replace it with:


function dsq_comments_text($comment_text) {
global $post;
$number_of_comments = get_comments_number();
return $number_of_comments;
}

Finally, to display the comment count in your WordPress theme, use the following code wherever you want to display “X Comments”:




This should fix the comments count in your WordPress Posts view, and make comments appear correctly on your blog if you use the comments_number() function in your theme.

Fix: WPtouch Pro Plugin Breaks WordPress 3.1’s Admin Bar

WordPress 3.1 rolled out today and brought with it several new features, one being the WordPress admin bar. This feature has been previously available to WordPress.com users and is now available to self-hosted sites (like Techerator), and gives logged-in users access to page controls without having to leave the site.

Sites that use the popular WordPress plugin WPtouch or WPtouch Pro will notice that this plugin breaks the new admin bar. While WPtouch is active, the admin bar will not appear on the main site or in the WordPress Dashboard (it took quite a bit of troubleshooting to narrow down which plugin was the culprit!).

The fix is very simple, and the team behind WPtouch has confirmed they are aware of the problem and intend to fix it.

The Fix

This guide requires that you edit plugin files in your WordPress installation. If you do not feel comfortable following this guide, please seek assitance before proceeding. And above all – make a backup!

Step 1: Navigate to the WPtouch plugin themes folder on your web server. Mine was located in /wp-content/plugins/wptouch-pro/themes/classic (If you’re using a different mobile theme, select that instead of classic.)

Step 2: Edit root-functions.php

Step 3: Locate the following code:


if ( function_exists( 'show_admin_bar' ) ) {
add_filter( 'show_admin_bar', '__return_false' );
}

And comment it all out:


//if ( function_exists( 'show_admin_bar' ) ) {
//    add_filter( 'show_admin_bar', '__return_false' );
//}

That’s it! Your WordPress 3.1 admin bar should now be visible on your site. To enable or disable the admin bar, visit your User settings under Users –> Your Profile in WordPress.

WordPress: How to Fix Author RSS Feeds with the FD Feedburner Plugin

If you run a WordPress-based website and offer RSS feeds to your readers, the WordPress plugin FD Feedburner is invaluable. This plugin automatically redirects any RSS feed on your website to the correct Feedburner feed with very simple configuration.

One problem with FD Feedburner is that it doesn’t support individual author RSS feeds. Since we have a team of writers here at Techerator, each author has their own individual RSS feed that follows the format http://www.techerator.com/author/{author’s username}/rss2. By default, FD Feedburner automatically redirects individual author pages to the main RSS feed.

The fix is straightforward, but requires you to log into your web server via FTP and copy-and-paste code into a PHP file. If you do not feel comfortable with these tasks, seek assistance before making any changes. And above all: always make a backup!

Step 1: Log into your web server with your FTP client of choice. I prefer WinSCP (free).

Step 2: Navigate to FD Feedburner’s plugin folder within WordPress (by default, it should be located at /wp-content/plugins/feedburner-plugin) and edit the file fdfeedburner.php.

Step 3: Locate the following code (in current version 1.43, it’s located at line 220):

if (($cat || $tag) && $options['feedburner_no_cats'] == 1) {

And replace it with the following code:

if (( ($cat || $tag) && $options['feedburner_no_cats'] == 1) || preg_match("/^\/author\//", $_SERVER['REQUEST_URI'])) {

Note: This code is designed for standard WordPress configurations. If you’ve made changes to your directory structure, you’ll have to change the regular expression specified in the preg_match() function.

Now when you link to an author’s individual RSS page, like mine at http://www.techerator.com/author/ewondrasek/rss2, you’ll be taken right to the individual author feed! Special thanks to my former MakeUseOf colleague Jorge Sierra for figuring this out.

How to Filter Your Facebook News Feed with the New Version of Facebook

About a year ago, I wrote a guide to filtering the noise from your Facebook News Feed that worked for the old version of Facebook.  The News Feed can get really messy when a lot of your friends are playing games like Farmville, Mob Wars, etc., and the old version of Facebook provided you with a simple method to view status updates only.

Facebook has since released a new version which rendered my old guide irrelevant.  Unfortunately, my News Feed still gets pretty ridiculous, so this updated guide will show you some new tips to block unwanted spam from your News Feed.

(By the way, for the sake of this article, I’m unblocking all of these applications to take screenshots.  It hurts.)

Method 1 – Hiding Applications

The simplest way to clean up your News Feed is to click the Hide button on offending applications.  You can then choose to hide the specific application (or the specific friend, if they’re a routine News Feed spammer).  Once hidden, that application will no longer show up in your News Feed.

If you decide you want  to unblock an application, you can open the News Feed Options menu to make changes.  Or, alternatively, you can gloat over all the applications that can no longer mercilessly spam you.

This list is _much_ longer.

Method 2 – Viewing Status Updates Only

Following the mentality of my original article, you can still view just status updates – it is just a little better hidden now.  To do this, click the Friends tab on the left side of the screen and select Status Updates.

Unfortunately, you can no longer set Status Updates as your default landing page when using Facebook.  But, do not despair!  You can instead bookmark the direct link to Status Updates, so you’ll go straight there in the future.

Conclusion

Social network games are apparently here to stay, mostly because of their addictive and never-ending nature (think: slot machines or World of Warcraft).  The best we can do is to hide the most offensive applications and hope they’ll have more restrictions when posting in the future.

Have any tips for keeping your Facebook News Feed clean?  I’d love to hear them – post in the comments below.

7 Gifts For Your Special Geek This Valentine’s Day

With Valentine’s Day happening this Sunday, hopefully you have thought ahead and purchased your special someone a gift already.  If you haven’t purchased your Valentine a gift yet, then continuing reading to get some ideas for what to get them this year.

E-Book Reader (Him and Her)

Chances are that your special someone likes to cozy up at night with a good book.  Instead of purchasing your them a paper copy of that best-seller, get them an e-book reader and the digital copy.  There are two main e-book readers to choose from, the Amazon Kindle and the Barnes & Noble Nook.  Although both items have their fans and opponents, I’m sure that this gift would be well-received and able to be enjoyed by all.

Amazon Kindle

Barnes & Noble Nook

iPod Touch (Him and Her)

If you’re looking for something that can be enjoyed by your special geek anywhere and everywhere, then an iPod Touch is the gift you want to purchase.  The iPod Touch’s large capacity and the ability to install applications from the App Store make it a great gift that can be customized to fit anyone’s needs.  Best of all, if you purchase your iPod Touch from Apple, you can have the gift custom engraved to add a personal touch.

iPod Touch from Amazon

iPod Touch (Customized) from Apple

Flip Camcorder (Her)

Digital cameras are great gifts, but why not take it a step further?  Flip Camcorders are small and portable digital camcorders that feature high quality video, long recording times, and come in a variety of colors and styles to fit anyone’s tastes.  At only 4″ x 2″ and just over 1/2″ thick, Flip Camcorders are able to record up to 120 minutes of video.  The Flip also features a large line of accessories to connect it to your TV or computer.  The Flip is compatible with both Windows and OS X operating systems.

Flip UltraHD Camcorder

Heated Coffee Mug (Him)

Coffee is only good until it cools off.  Keep your special someone’s coffee warm by getting him a heated coffee mug.  Some options available include 12 V heating, USB heating, and temperature gauges.

Heated Coffee Mugs at Amazon

Powermat (Him)

Chances are that your Valentine has multiple devices that need to be charged on a consistent basis.  With each device needing its own charger, the mess of cords can easily become too much to handle.  Help reduce the tangle of cords with a Powermat.  The Powermat features a universal charging system that is able to charge almost any device.  A selection of receivers is also available to add support for devices such as the iPod Touch, BlackBerry smartphones and the Nintendo DS.

Powermat

Digital Photo Frame (Her)

Although they have been around for a while now, digital photo frames are still a good gift for a close friend.  With the ability to add large quantities of pictures and the addition of your special song, digital photo frames are still a well-received gift.  To make the gift extra special, add some pictures before you wrap the gift to really surprise your Valentine.

Digital Photo Frames at Amazon

Fun Tee-Shirts (Him and Her)

A fun tee-shirt is a great personal gift for you Valentine this year.  Available in all shapes and sizes, you can find tee-shirts that feature a wide range of funny and just downright geeky subjects.  Some examples include this All Your Bases poem tee and this pair of proximity sensing shirts for him and her.

Tee-shirts from ThinkGeek

Tee-shirts from Donkey Tees

Have any great Valentine’s Day gift ideas we didn’t mention?  Share them with us in the comments!

Fix: Adobe AIR Apps Crash After Upgrading to Fedora 12

adobe_airAfter upgrading your system to Fedora 12, you may notice that some of your Adobe AIR applications no longer load properly.  The problem may persist even after you have reinstalled both Adobe AIR and the individual Adobe AIR applications.

An error you may receive when installing the AIR applications is shown below:

Application crashed with an unhandled SIGSEGV

The above problem is caused by an invalid certificate file.  Simply deleting the certificate file as shown below will cause your Adobe AIR applications to begin working again.

Run the following command from terminal to fix the problem:

sudo rm -rf /etc/opt/Adobe/certificates/crypt/

Fix: Windows Vista 64-bit Gets Blue Screen After Windows Updates

A recent Windows Update (KB973879) has been causing a “blue screen of death” (stop error) in many computers running Windows Vista 64-bit edition.  Many of the affected computers are HP Pavillion dv Series laptops (such as dv4 and dv6 models), but we have had reports of other manufactures having the same issues.  The problem occurs shortly after starting the computer.

The specific error is:

A problem has been detected and Windows has been shut down to prevent damage to your computer.

Technical information:

*** STOP: 0x0000007E (0xFFFFFFFFC0000005, 0xFFFFF800020393AA, 0xFFFFFA60021EE7D8, 0xFFFFFA60021EE1b0)

hp-bsod

So far, we have found two methods to fix this problem.  Try the first method (using Safe Mode), and if that doesn’t work try the second method (using System Restore).

Method 1 (Safe Mode)

Step 1: Restart your computer and continuously tap the F8 key while it is restarting.  You will eventually see the ‘Advanced Boot Options’ screen, where you need to select the Safe Mode option.

hp-bsod-safemode

Step 2: Click the Start Menu and type Programs and Features in the search box.  Press enter when the Programs and Features option is selected.

hp-bsod-startmenu

Step 3: Select View installed updates in the top left of the window.

hp-bsod-viewupdates

Step 4: Locate Update for Microsoft Windows (KB973879) in the list of updates.  You can sort by name for easier searching by clicking the Name column.  Click Uninstall at the top of the list.

hp-bsod-uninstall

Step 5: Click Restart Now.  Your computer should now function properly.  If not, try Method 2 below.

Method 2 (System Restore)

Step 1: Restart your computer and continuously tap the F8 key while it is restarting.  You will eventually see the ‘Advanced Boot Options’ screen, where you need to select the Repair Your Computer option.

hp-bsod-repair

Step 2: Select your keyboard layout, which will typically be ‘US’.

hp-bsod-keyboard

Step 3: Enter your username and password.  If you have no password, just click OK.

hp-bsod-username

Step 4: Click System Restore in the System Recovery Options menu.  This may take a few minutes to launch so be patient.

hp-bsod-restore

Step 5: When the System Restore window opens, click Next.  Select the most recent system backup and click Next.

hp-bsod-restoreupdate

Step 6: Make sure your main drive is selected (most likely C:) and click Next.  Click Finish in the next screen.  Click Yes to the warning dialog.

hp-bsod-selectdrive

Step 7: When the restore has finished, you shoud receive a successful completion message.  Click the Restart button.

Step 8: When your computer  has restarted, click the Start Menu and type Programs and Features in the search box.  Press enter when the Programs and Features option is selected.

hp-bsod-startmenu

Step 9: Select View installed updates in the top left of the window.

hp-bsod-viewupdates

Step 10: Locate Update for Microsoft Windows (KB973879) in the list of updates.  You can sort by name for easier searching by clicking the Name column.  Click Uninstall at the top of the list.

hp-bsod-uninstall

Step 11: Click Restart Now.  Your computer should now function properly.

Have you experienced this problem?  Tell us about it (including the model of computer you have) in the comments.

Fix: Connecting USB Devices To VirtualBox On Fedora 11

virtualbox-thumb

Update: This problem has been resolved in VirtualBox Version 3.0.8. Remove the following fix before upgrading to 3.0.8 to take advantage of the update.  For help on installing VirtualBox on Fedora 11, checkout our guide.

I have come across one problem with VirtualBox on Fedora 11 – USB devices are listed in the device manager but are grayed out and cannot be enabled.  To see if this problems exists on your system you can navigate to Devices > USB Devices in a running virtual machine console window.  The devices physically connected to the host are shown, but are grayed out and are not clickable, preventing them from being connected to the virtual machine.

To correct the problem, edit /etc/fstab and add the following line:

none /sys/bus/usb/drivers usbfs devgid=501,devmode=664 0 0

Substitute “devgid=501” with the id of the vboxusers group which all VirtualBox users should be part of.  The id of the vboxusers group can be found by navigating to System > Administration > Users and Groups.

Once you are finished, power off all virtual machines.  Run the following command in Fedora to enable USB support:

mount -a

When you power on your Virtual Machine next time, the USB devices under Devices should no longer be grayed out and are now clickable, allowing you to connect them to your virtual machines.

Fix: Firefox Won’t Save Cookies or Auto-Logins

firefoxquestion1Update 06-16-09: Mozilla has announced in Firefox 3.0.11 that “Several issues were reported with the internal database, SQLite, which have now been fixed by upgrading to a newer version.”  So if this guide works for you, be sure to upgrade to the newest version of Firefox.

It can strike when you least expect it – Firefox amnesia.  The symptom: Firefox no longer keeps you automatically logged in to sites where you have selected the “remember me” option.  I recently had this problem, and although Firefox would maintain my logins during my current session, they would immediately be forgotten when I closed the browser.  Typically, this problem is related to browser cookies, which are small data files stored on your computer by websites to help identify you and store information.

Before you start, it is important that you verify that Firefox’s forgetfulness is not caused by a simpler problem.  First, you should clear your current cookies, which can be done by going to Tools –> Clear Private Data and checking the Cookies box.  While you’re in there, you could clear your browser’s cache and authenticated sessions as well (just in to be safe).

firefoxamnesia1

Next, you should temporarily disable any add-ons you are currently using to ensure they are not causing conflicts with your browser’s operation.  You can systematically disable them one at a time via Tools –> Add-ons, or you can disable them all at once by running Firefox in Safe Mode and choosing to disable all add-ons.

To disable all add-ons at once, go to Start –> Mozilla Firefox –> Mozilla Firefox (Safe Mode)  and check the “Disable all add-ons” box.  You could also check the “Reset all user preferences to Firefox defaults” to make sure it isn’t a problem with your browser settings, but be warned: this will remove any custom settings you have made (such as your browser’s start page).

firefoxamnesia

If the methods above did not resolve Firefox’s forgetfulness, then the source of this problem is likely caused by a file called cookies.sqlite becoming corrupt.  This file manages Firefox’s cookies, and if it becomes corrupt it can stop Firefox from storing cookies altogether.

To fix the problem, completely exit Firefox and head to your Firefox Profile folder.  In Windows XP/Vista, this folder can be accessed by going to your Start Menu and clicking Run.  Copy and paste the following: %APPDATA%/Mozilla/Firefox/Profiles into the dialog box and press enter, and open your unique profile folder which will appear like jibberish (mine being 1nbhqks4.default)

In this folder, locate the file named cookies.sqlite.  Copy this file to a safe location as a backup (or you can rename the file to something like cookies.BAK) and then delete the original.  When you reopen Firefox, it will create a new cookies.sqlite file and it should now store cookies properly.

firefoxamnesia2

Note:  If you are still having problems after following this guide, check your virus scanner to make sure it is not modifying or quarantining your cookie files.