Support » Plugins » Problem with WP-ContactForm 1.5.1 and Add an Image

  • Resolved denysri


    The Add an image (on the Write Post page) give me an error message,
    “..Are you sure you want to continue?..”
    when using WP-ContactForm 1.5.1

    I did deactivate all plugins and activate it one by one
    and found that WP-ContactForm 1.5.1 causing the problem.

    Is it just me?

    WordPress 2.5 and WP-ContactForm 1.5 (along with the others plugins active) did work fine for me.

Viewing 8 replies - 1 through 8 (of 8 total)
  • It’s not just you, version 1.5.1 of WP-ContactForm breaks the media manager in WordPress.

    I had the same problem. I deactivated all my plugins and then reactivated them one by one. WP-ContactForm is causing the problem with media manager. I think I’ll try to find another Contact Form plugin so that I don’t have to keep deactivating my contact form whenever I need to upload a photo.

    Moderator Sergey Biryukov


    WordPress Dev

    In the beginning of wp-contactform.php there are some lines entitled “Grab some default user info, if available”. In order for Media Uploader to function properly, they should be moved to wpcf_callback function, right before the call of wpcf_check_input. Worked for me, hope this helps.

    Thanks SergeyBiryukov for this fix. Works great for me.
    For others looking at this later:

    In wp-contactform.php, move this block of code (starting around line 13:

    //Grab some default user info, if available (Submitted by Dan)
    	$wpcf_auto_email = get_profile('user_email');
    	$wpcf_auto_ID = get_profile('ID');
    	$wpcf_auto_first_name = get_usermeta($wpcf_auto_ID, 'first_name');
    	$wpcf_auto_last_name = get_usermeta($wpcf_auto_ID, 'last_name');
    	$wpcf_auto_name = $wpcf_auto_first_name.' '.$wpcf_auto_last_name;
    	if (empty($_POST['wpcf_email'])) {
    		$_POST['wpcf_email'] = $wpcf_auto_email;
    	if (empty($_POST['wpcf_your_name'])) {
    		$_POST['wpcf_your_name'] = $wpcf_auto_name;

    And move it, placing it just before this line (around line 137):
    if(wpcf_check_input()) // If the input check returns true (ie. there has been a submission & input is ok)

    After modify wp-contactform.php the images upload restart working.

    Thanks! That fix worked perfect.

    Gracias decavolt (Thank you decavolt).

    Esto soluciona el problema.

    A bit late perhaps, but thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Problem with WP-ContactForm 1.5.1 and Add an Image’ is closed to new replies.