Support » Fixing WordPress » Upload error with NextGen Gallery and CF7 plugin

  • WordPress v.3.3.2
    NextGen Gallery v.1.9.3
    Contact Form 7 v.3.2

    When I try to upload images into a NextGen gallery I get the error message right after I push the upload button:

    Error: imagename.jpg:
    Fatal error: Call to undefined function wpcf7_add_tag_generator() in …/plugins/contact-form-7/modules/text.php on line 152

    Content line 152:
    wpcf7_add_tag_generator( ‘text’, __( ‘Text field’, ‘wpcf7’ ),

    When I deactivate CF7 I can upload images to a gallery.

    What has CF7 with NextGen gallery in common?
    What could cause this problem?

Viewing 10 replies - 1 through 10 (of 10 total)
  • It´s a bug in NextGen. You have to edit ngg-config.php.


    require_once( WP_LOAD_PATH . 'wp-load.php');

    Replace with:

    require_once( WP_LOAD_PATH . 'wp-admin/admin.php');

    Save and upload the file. I hope this will be fixed in the next version of NGG

    Yes your solution is working! Thanks a lot Col Pain 🙂

    Thank you, Col Pain. I hope the gallery developer would fix this bug in the next plugin release.

    Lots of gratitude from me too, Col Pain. Thanks!!!

    Thank you Col Pain. Your solution works.

    Two questions, doe you have to do that everytime you upload a gallery and second, I am clueless to what you are talking about. Can you explain where and how you need to paste that to someone who has never modified anything?

    I do appreciate finding the answer so quick and Col Pain taking time to share that answer.

    No, you need to do this modification only one time, until the next update of NextGen Gallery.

    First you open your FTP-Tool (e.g. Filezilla) and navigate to yourdomain//wp-content/plugins/nextgen-gallery. Find the file ngg-config.php and download it to your computer. Open this file with your editor (e.g. Notepad++) and find

    require_once( WP_LOAD_PATH . 'wp-load.php');

    It should be the last line in this file. Replace this line with

    require_once( WP_LOAD_PATH . 'wp-admin/admin.php');

    Save the file and upload it, replacing the old version. That´s it, you´re done.

    You are great Col Pain! Thank you for taking the time to educate me.

    Wow, I can’t believe that I did this and it worked!

    Thank you very much Col Pain.

    Thanks so much. I have three sites that all started having this error, and they are now fixed.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Upload error with NextGen Gallery and CF7 plugin’ is closed to new replies.