Title: Plugin malfunction
Last modified: August 21, 2016

---

# Plugin malfunction

 *  [MonMidt](https://wordpress.org/support/users/monmidt/)
 * (@monmidt)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/plugin-malfunction-1/)
 * Hi.
 * I’ve installed the “Contact Us Page Builder”-plugin but it won’t let me drag 
   and drop…?
    I got this message in WP:
 * > arning: Missing argument 2 for wpdb::prepare(), called in C:\xampp\htdocs\wordpress\
   > wp-content\plugins\wp-contactpage-designer\includes\template.php on line 138
   > and defined in C:\xampp\htdocs\wordpress\wp-includes\wp-db.php on line 992
 * So I checked out the code-lines in template.php :
 *     ```
       public static function get_templates() {
               global $wpdb;
   
               $query = "SELECT * FROM <code>{$wpdb->prefix}cpd_templates</code> ";
               $templates = $wpdb->get_results( $wpdb->prepare( $query ) );
   
               return $templates;
           }
       ```
   
 * and then the wp-db.php which states:
 *     ```
       function prepare( $query, $args ) {
       		if ( is_null( $query ) )
       			return;
   
       		$args = func_get_args();
       		array_shift( $args );
       		// If args were passed as an array (as in vsprintf), move them up
       		if ( isset( $args[0] ) && is_array($args[0]) )
       			$args = $args[0];
       		$query = str_replace( "'%s'", '%s', $query ); // in case someone mistakenly already singlequoted it
       		$query = str_replace( '"%s"', '%s', $query ); // doublequote unquoting
       		$query = preg_replace( '|(?<!%)%f|' , '%F', $query ); // Force floats to be locale unaware
       		$query = preg_replace( '|(?<!%)%s|', "'%s'", $query ); // quote the strings, avoiding escaped strings like %%s
       		array_walk( $args, array( $this, 'escape_by_ref' ) );
       		return @vsprintf( $query, $args );
       	}
       ```
   
 * What am I supposed to do with which code to make this plugin function?

Viewing 1 replies (of 1 total)

 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/plugin-malfunction-1/#post-4136678)
 * Please post this topic in the plugin’s dedicated forum:
    [http://wordpress.org/support/plugin/wp-contactpage-designer](http://wordpress.org/support/plugin/wp-contactpage-designer)
 * This is why it’s giving a warning:
 * > [PHP Warning: Missing argument 2 for wpdb::prepare()](https://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/)

Viewing 1 replies (of 1 total)

The topic ‘Plugin malfunction’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/plugin-malfunction-1/#post-4136678)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
