• Resolved jcmilton

    (@jcmilton)


    I just updated (automatically) to Contact Form 7 version 3.2 and I’m using the latest NextGEN version of 1.9.3. After updating Contact Form 7 to 3.2 now all of a sudden I cannot upload images using NextGEN Gallery.

    When I try to upload I get this error:

    ERROR: sample-image.jpg:
    Fatal Error: Call to undefined function wpcf7_add_tag_generator() in /home/xxxx/public_html/wp-content/plugins/contact-form-7/modules/text.php on line 152

    The end result is that no images are uploaded. But if I disable the Contact Form 7 plugin, the NextGEN Gallery upload works again. So there is a conflict in there somewhere with the latest version of Contact Form 7.

    Is this happening to anyone else?

    Any help would be appreciated!

    Thanks!

    http://wordpress.org/extend/plugins/nextgen-gallery/

Viewing 15 replies - 16 through 30 (of 56 total)
  • same problem

    hello,
    I ve tried to modify the ngg-config.php but it doesn ‘t work …
    When I want to create , modify or upload img the menu dont appeared …

    http://portfolio.bealcost.com/wp-admin/admin.php?page=nggallery-add-gallery/

    I m waiting for solution , thanks a lot …

    passimal, Sounds like a different problem. Maybe start a new thread. This one is for the upload but when using Contact Form 7.

    Hello I dont think so …
    I put the original theme ( twenty eleven)
    I disable plugin contat form 7
    I upload WP 3.2.2
    And the same … so I dont know ….

    mslocum- it does break something. You wrote:

    ‘Change the last line in NextGen’s ngg-config.php file from
    require_once( WP_LOAD_PATH . ‘wp-load.php’);
    to:
    require_once( WP_LOAD_PATH . ‘wp-admin/admin.php’);

    Disclaimer: I’m not a NextGen or Contact Form 7 developer. From searching through their code it looks like the ngg-config.php file is always loaded for admin uses. This means that the above fix should not break anything. I can’t guarantee this, but it is working so far for me.’

    I tried this on a site I’m developing. Although it fixed the admin upload, it breaks the author upload. I am using the capability manager. If “NextGEN Manage others gallery” is unchecked, no galleries are able to be accessed, even that users. If it is checked, then that user can manage ALL galleries.

    a_johnson,
    I tried re-creating your problem, but it all seemed to work as expected for me.

    What I tried:

    • Have user with role Author
    • Set NextGEN roles ‘Add gallery/Upload images’ and ‘Manage gallery’ to Author
    • Assign a gallery to the author user
    • My author user can upload and manage the gallery that they own as expected.

    Am I missing something?

    When I set ‘Manage others gallery’ to Author I am able to upload to any gallery.

    You said you are using the ‘capability manager.’ Do you mean the built-in page admin.php?page=nggallery-roles or are you using a plugin?

    I’m using the Capability Manager plugin. THe NGG roles are currently set to author. This did work previously and the only change was the ‘require_once( WP_LOAD_PATH . ‘wp-admin/admin.php’);’ fix.

    See screen shots~ http://templatesagogo.com/NGG-roles.png and http://templatesagogo.com/NGG-capability-mrg.png

    I forgot to add that it looks like Contact form 7 is in conflict with other plugins too. Maybe the solution is to work some magic there as opposed to NGG? As others have said, these are two of the most popular plugins for WP. I use them on almost all the sites I write.

    I’m still having trouble duplicating the problem, but I probably don’t have everything setup the same way. From my experience doing custom capabilities, once you set them they are stored in the database. I haven’t looked into this plugin, but I’m guessing you can disable it and it keeps all the roles. Because it doesn’t play an active role, it just sets them when you hit save.

    If you notice nextgen-gallery/admin/upload.php lines 38 and 41, this seems problematic to me. We already did the admin bootstrap by changing the ngg-config.php, then the uploader is unsetting the user, then calling the admin bootstrap again. The author even admits, “don’t ask me why”. It looks to me like the whole uploader for NextGEN needs to be refactored. This is actually why I put in the disclaimer. It looks like NextGEN’s uploader is a bunch of hacks.

    I’m personally not a huge Contact Form 7 fan, but I use it anyway. But from a developer’s perspective, it looks they are loading files properly. They have dozens of php files, but they are only loading the ones that are needed. Look at contact-form-7/settings.php line 11. This is a very good thing. It improves website performance and reduces server memory usage. If there are other plugins that don’t load the WordPress bootstrap properly then shame on them. They either need to learn how to program or stop being lazy. I’m struggling not to rant more. πŸ™‚

    Sorry, I couldn’t help figure out any more with your capabilities problem. Anyone else having this problem with capabilities?

    Hi there.
    Same trouble here. Can’t upload new images.

    But even after reinstalling the latest version of the plugin of Contact form 7 I keep getting the same error.

    I used the latest version from June 2.
    It’s conflicting my nextgen gallery plugin and I can’t upload new images. I am quite relieved that the gallery itself is still working though.

    I don’t understand why the latest plugin worked for others.
    Any ideas? :S

    The error:
    http://i27.photobucket.com/albums/c191/irrimiriam/ScreenShot2012-06-12at091835.png

    Kind Regards

    I’ll probably just remove Contact Form 7 and use another plugin. I’ll restore NGG to the original code for now. I actually need CF7 more than I need NGG but NGG has features that other galleries don’t have.

    It looks like something else changed re: Capabilities. Authors are not allowed to edit their own galleries or add photos even with the permissions set properly. So the issue is probably unrelated to the code change.

    Thanks mslocum, I experienced the same problems after an update of the contact form. Your solution resolved it!

    Cheers,
    Kenneth

    Thanks mslocum. Your simple solution worked for me. No side effects noticed yet. I hope one of the plug-ins causing the issue is soon updated (sounds like it should be NextGen). This is going to a be a very common issue for many users.

    Thanks, also, mslocum. Made recommended changes and problem is eliminated.

Viewing 15 replies - 16 through 30 (of 56 total)
  • The topic ‘[Plugin: NextGEN Gallery] Conflict with Contact Form 7?’ is closed to new replies.