I recently discovered a problem with how NextGEN PRO albums link to gallery pages (manually created pages). They’re broken and send you to a non-existing page. You know, that evil “404 Not Found” error that we all hate. Especially Google! I tried visiting the NextGEN Gallery forums and the WordPress forums, where some users were having similar issues, and of course I searched the all knowing Google. But, surprisingly, there was no solution to be found. So, I did a little old fashioned digging around on my clients website. Guess what? I found the solution! You’ll have to keep reading to learn how to fix it.
While investigating the 404 error, I noticed that every album linking to a gallery page was using a cryptic URL. You know, that default out-of-the-box address that looks something like this “www.yoursite.com/?page_id=123”.
Ahah! It’s a permalink issue! But, when I checked the permalink settings, the “Post name” permalink structure (human friendly links) was selected. As permalink troubleshooting dictates, I clicked on the “Save Changes” button to reset the settings. When that didn’t work, I saved the “Default” setting, then saved the “Post name” setting again. No dice. The 404 error is still there. So, what gives?
I then began digging a little deeper. I disabled all of the plugins except NextGEN Gallery and NextGEN PRO.
Want to take a wild guess at what happened next?
The 404 errors disappeared! The links look pretty! Unicorns are now farting rainbows! All is good in the world!
Ok, ok, not quite.
Now, the next step is to re-enable the plugins one at a time until the 404 error comes back.
The error started once I re-enabled a plugin named “404 Redirected”. Great, all I have to do is remove that plugin and everything will be resolved!
There’s a small problem though. My client needs the 404 Redirected plugin to control dead links and redirects from within the control panel.
Not all is lost… Keep reading.
The solution to the problem with how NextGEN PRO albums link to gallery pages, doesn’t reside within NextGEN Gallery or PRO. The solution can be found within the 404 Redirected plugin. Why not use the plugin to fix the problem it created in the first place?
Allow me to explain.
The 404 Redirected plugin is causing NextGEN to generate cryptic URL’s, but that same plugin can also redirect those cryptic URL’s back to friendly ones.
Soooo… Take that ugly URL and redirect it to the pretty URL of the gallery page you created! Using a 301 permanent redirect of course. That always helps with Google.
When you encounter a problem with your WordPress install, there are some best practices to follow when troubleshooting. Before going bananas and bashing your head into a wall, follow these basic steps:
- Don’t use outdated plugins
- Backup your site files and database
- Update your WordPress install
- Update all your plugins
- Reset your site’s permalinks
- Backup your site’s files and database again
- Deactivate all plugins except the one having the issue (did the problem go away?)
- Re-activate plugins one at a time (take note of when problem resurfaces)
- Get rid of the offending plugin (unless you can use it against itself like I did 😉
After some good old fashioned WordPress troubleshooting, I discovered that the 404 Redirected plugin conflicted with NextGEN PRO and caused it to generate broken links. But, all I had to do was create a 301 redirect from within the plugin itself to resolve the conflict.
I truly hope you found this to be helpful. Please feel free to comment below and share this post!