Fix WordPress NextGen Gallery Loss of Stylesheet

by Michele on October 27, 2010

in WordPress Plugins

As I’ve written about Alex Rabe’s great NextGen Gallery plugin (here on the WordPress plugins site) several times before, both here, and here, I continue to use it and promote it as often as possible.

However, in a recent client situation, a major layout problem surfaced.

In moving a site from a development environment to a live server, the galleries stopped appearing properly.

Here's how the gallery should appear when showing up correctly

And here’s what happened when moving the site to the live server:

Slides appearing incorrectly on live server after migration

Galleries that previously looked great, and had a clean, well-proportioned layout suddenly looked completely bland and messed up. This was a real issue, and I started to wonder if I needed to rewrite some code on the site. However, a bit of analytical thinking quickly helped to track down and solve the issue.

Tracking down the problem

Obviously, the NextGen Gallery was no longer showing up properly because there was no stylesheet attached to it. Evidently, moving the site caused the connection of the stylesheet for the plugin to break.

Fixing this involved no coding whatsoever – just a quick trip to the lower left side of the Admin page, under “Gallery >> Style”:

Quick trip to NextGen Gallery's Style area

This is what it looked like on the site where it wasn’t coming up correctly; clearly, it couldn’t find a stylesheet:

NextGen Gallery Unable to find a Stylesheet to Use

The fix is simple – just select “Default Styles” from the dropdown, click the checkbox, and then click the “Activate>>” button:

Reconnecting NextGen Gallery to its stylesheet

Once that’s done, you should see this:

NextGen now has a style sheet to use

And “Presto” – the gallery now appears correctly:

And now the slideshow appears correctly...

My favorite fixes – no coding, once again, showing how great WordPress and NextGen Gallery are, even in recovering from errors.

  • Delicious
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • Twitter

Leave a Comment

Previous post:

Next post: