PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Strange Error on install

  1. torweb
    Member

    I use GF quite a bit but this time get a strange error message when I install it. The message appears just above the visual editor screen. It's even the if I uninstall all plugins. Here is the message:

    Warning: sprintf() [function.sprintf]: Too few arguments in /home/content/71/9119371/html/TEMP WORDPRESS SITES/nwsps/wordpress/wp-admin/includes/media.php on line 385

    Thanks in advance for any ideas.

    The site is at http://www.consultyou.net/TEMP WORDPRESS SITES/nwsps/wordpress

    Posted 12 years ago on Monday August 6, 2012 | Permalink
  2. torweb
    Member

    The is the block of code in question:

    function media_buttons($editor_id = 'content') {
    	$context = apply_filters('media_buttons_context', __('Upload/Insert %s'));
    
    	$img = '<img src="' . esc_url( admin_url( 'images/media-button.png?ver=20111005' ) ) . '" width="15" height="15" />';
    
    	echo '<a href="' . esc_url( get_upload_iframe_src() ) . '" title="' . esc_attr__( 'Add Media' ) . '" rel="nofollow">' . sprintf( $context, $img ) . '</a>';
    }
    add_action( 'media_buttons', 'media_buttons' );
    
    function _media_button($title, $icon, $type, $id) {
    	return "<a href='" . esc_url( get_upload_iframe_src($type) ) . "' title='" . esc_attr( $title ) . "' rel="nofollow"><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' onclick='return false;' /></a>";
    }
    
    function get_upload_iframe_src( $type = null, $post_id = null, $tab = null ) {
    	global $post_ID;
    
    	if ( empty( $post_id ) )
    		$post_id = $post_ID;
    
    	$upload_iframe_src = add_query_arg( 'post_id', (int) $post_id, admin_url('media-upload.php') );
    
    	if ( $type && 'media' != $type )
    		$upload_iframe_src = add_query_arg('type', $type, $upload_iframe_src);
    
    	if ( ! empty( $tab ) )
    		$upload_iframe_src = add_query_arg('tab', $tab, $upload_iframe_src);
    
    	$upload_iframe_src = apply_filters($type . '_upload_iframe_src', $upload_iframe_src);
    
    	return add_query_arg('TB_iframe', true, $upload_iframe_src);
    }
    Posted 12 years ago on Monday August 6, 2012 | Permalink
  3. David Peralty

    Are you using the latest WordPress and Gravity Forms versions? Are you using any plugins that modify file management and media uploads in WordPress? This error appears only when Gravity Forms is enabled?

    Posted 12 years ago on Monday August 6, 2012 | Permalink
  4. torweb
    Member

    WP 3.4.1
    GF 1.6.5.1

    Gravity Forms is the only plugin I have installed. I also just reinstalled WP. If I uninstall GF, the error is gone???

    Posted 12 years ago on Monday August 6, 2012 | Permalink
  5. David Peralty

    Which theme are you using? Can you link to your site? The error you see, can you screenshot it and upload it to an image sharing site?

    Posted 12 years ago on Monday August 6, 2012 | Permalink
  6. torweb
    Member

    The site is at http://www.consultyou.net/TEMP WORDPRESS SITES/nwsps/wordpress/

    Note: the above link is the full url but it's cutting of before the first forward slash

    Also when Gravity Forms is installed, the icon for inserting images is gone with the above error code above the visual edit screen.

    An image of the screen is here:P http://consultyou.net/tempimage/screen.jpg

    The theme is Avett by designerthemes and a demo is here: http://designerthemes.com/preview/?theme=avett

    Posted 12 years ago on Tuesday August 7, 2012 | Permalink
  7. torweb
    Member

    Well it seems GF totally breaks the theme I'm using, which I'm sure is due to theme but I have no idea where to look.

    Posted 12 years ago on Wednesday August 8, 2012 | Permalink
  8. David Peralty

    Yeah, that error is a new one to me as well. We do add our own item to the media list so you can quickly add your Gravity Form shortcodes, but I've never seen it conflict with a theme before. Can you contact the theme developer and maybe have them get a hold of me at peralty@rocketgenius.com so we can see about getting this figured out?

    Posted 12 years ago on Wednesday August 8, 2012 | Permalink
  9. torweb
    Member

    I've started that process...thanks again!

    Posted 12 years ago on Wednesday August 8, 2012 | Permalink
  10. sparklogix
    Member

    Not sure if you found a solution or if anyone else is having the same issue, but I found that it's neither the plugin or the theme that's the issue. It's the directory that WP is installed in. If you look at your URL, there are spaces in it. Rename your directory to be lowercase and exclude spaces and it fixes the problem.

    Posted 12 years ago on Thursday August 23, 2012 | Permalink