Recently whilst developing a website we came across a small issue. We already had Contact Form 7 installed on a WordPress website, we also required a gallery for this website so included NextGen which is our bread and butter gallery. When trying to upload images to NextGen via the flash uploader we were presented with a PHP error. This error was seen within the popup box so we had to screen shot it to be able to figure out what the error was.
After finding that error we can see that its referring to the wpcf7_add_tag_generator function. After looking into this we find that this function is for the plugin Contact Form 7. However this is not the genuine issue, this is a knock on form something else.
The NextGen file upload.php does not actually require the wp-load.php file. This loads all of the plugins, then later on the WordPress admin bootstrap is included. This is a problem because WordPress already loaded this as a non-admin. The fix is actually quite simple. We just need to change the last line of NextGen’s ngg-config.php file. (this can be found in the root of the nextgen plugin folder)
require_once( WP_LOAD_PATH . 'wp-load.php');
require_once( WP_LOAD_PATH . 'wp-admin/admin.php');
That’s it! NextGen’s Flash up loader should now be working again.