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.
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
SergeyBiryukov
Thanks! That fix worked perfect.
Gracias decavolt (Thank you decavolt).
Esto soluciona el problema.
A bit late perhaps, but thanks!