Category: Geekery

A major win: VirtualBox installation + Windows 7

For nearly 3 months, my virtual machine at work was entirely conked out.

About the first week of December, I tried to upgrade my VirtualBox installation and it failed. I never could figure out what happened; I spent several days troubleshooting over the course of December and January. In the beginning of January, I was able to install a VERY old version  of VirtualBox (I think 3.1?) but then my installation of Windows 7 completely failed. I  gave up 3 weeks ago, and then found myself with a few slow hours this afternoon and decided to tackle it. Guess what? I SUCCEEDED!

This afternoon, I tried installing the latest version of VirtualBox (4.1.8) and it kept failing at the 95% mark of the installation. After some googling and forum reading, I discovered it possibly had something to do with an improper uninstall (this insight mainly came from this thread: https://www.virtualbox.org/ticket/1578 ).

From my 4.1.8 VirtualBox download, I ran the VirtualBox_Uninstall.tool. It opens up terminal, you have to type “Yes” and then it prompts you for your machine’s password. After that, it said something about kernels and can’t uninstall and rebooting (BTW, the only kernels I know about are the lovely extra crunchy popcorn kernels at the bottom of a popcorn bag). So I did a restart. When I was booted up again, I again opened the 4.1.8 VirtualBox download and ran VirtualBox_Uninstall.tool. This time, terminal ran a whole of 4 seconds and returned that it was completely uninstalled. WOOT!

I then double-clicked VirtualBox.mpkg and the installation succeeded!

Once the installation completed, I followed this screenshot tutorial for configuring the virtual machine. At 99% through the tutorial, I wasn’t able to figure out how to define where my Windows 7 ISO file, so then I followed this video tutorial for installing Windows 7. I was able to figure out where in the VirtualBox settings to define my Windows 7 ISO file in the first 2 minutes of the video.

My VirtualBox installation and Windows 7 installation WORKS LIKE A CHARM!

Looking back at the screenshot tutorial, after I watched the video tutorial, I see where I got lost. If I had looked a bit closer at the screenshot, I would’ve seen that the tutorial loads an ISO file.

Anyways, that doesn’t matter, what matters is that after my virtual machine going down the first week of December, I finally have it back!! WOO HOOO!!!!!

This makes for a Great Monday.

PS, In case you’re wondering… my work machine is a Mac OS X 10.6.8 (Snow Leopard), and I got VirtualBox 4.1.8 installed and it runs Windows 7 64-bit.

WordPress: new Custom Post Type returning 404

I added a custom post type to a WordPress website that I’m building and created two new posts using the custom post type. When I went to view them, I got a 404 error.

Create the custom post type:

add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type( 'campus_advisory',
array(
'labels' => array(
'name' => __( 'Campus Advisories' ),
'singular_name' => __( 'Campus Advisory' )
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'advisory')
)
);
}

Did a bit of searching around and learned that after you create a custom post type, you need to visit the Permalinks page in the WordPress back-end (Settings > Permalinks). I clicked “Save” (even though I didn’t change anything on the page) and refreshed the custom post and it returned the post rather than a 404.

One step further, and I didn’t have to go this far, but folks that visited the Permalinks page and that didn’t fix their 404 error, they had to add
flush_rewrite_rules();
after calling register_post_type in their custom post type code snippet in functions.php (or custom_functions.php if you’re using the Thesis framework—the site I’m currently developing uses the Thesis framework).

Follow up to WordPress 3.3

Just started truly exploring but 2 immediate favs:
1) Drap and drop media uploader. Hot stuff. Also, the uploader no longer designates certain icons for certain file types; it’s all a single icon and after you drag&drop, WordPress does the thinking for you.

2) Comments interface. It could possibly just be the styling of comments in the WordPress twenty-eleven theme, haven’t checked in other themes yet, but I really like it.