• Resolved Vanessa

    (@vanessajaded)


    I keep getting this warning message above my Mingle Forum content:

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/watson13/public_html/home/wp-content/plugins/mingle-forum/wpf.class.php on line 405 and defined in /home/watson13/public_html/home/wp-includes/wp-db.php on line 1147

    I went to the file and line specified, but I have no idea how to fix it. Here is the code from both files on the lines specified:

    line 405 segment:

    function get_paged_threadlink($id, $postid = ''){
    		global $wpdb;
    		$wpdb->query($wpdb->prepare("SELECT * FROM $this->t_posts WHERE parent_id = $id"));
    		$num = ceil($wpdb->num_rows / $this->options['forum_posts_per_page']) - 1;
    		if($num < 0)
    			$num = 0;
    		if($this->options['forum_use_seo_friendly_urls'])
    		{
    			$group = $this->get_seo_friendly_title($this->get_groupname($this->get_parent_id(FORUM, $this->get_parent_id(THREAD, $id)))."-group".$this->get_parent_id(FORUM, $this->get_parent_id(THREAD, $id)));
    			$forum = $this->get_seo_friendly_title($this->get_forumname($this->get_parent_id(THREAD, $id))."-forum".$this->get_parent_id(THREAD, $id));
    			$thread = $this->get_seo_friendly_title($this->get_subject($id)."-thread".$id);
    			return rtrim($this->home_url, '/').'/'.$group.'/'.$forum.'/'.$thread.".".$num.$postid;
    		}
    		else
    			return $this->thread_link.$id.".".$num.$postid;
    	}

    line 1147 segment:

    function prepare( $query, $args ) {
    		if ( is_null( $query ) )
    			return;
    
    		// This is not meant to be foolproof -- but it will catch obviously incorrect usage.
    		if ( strpos( $query, '%' ) === false ) {
    			_doing_it_wrong( 'wpdb::prepare', sprintf( __( 'The query argument of %s must have a placeholder.' ), 'wpdb::prepare()' ), '3.9' );
    		}

    Any help is very much appreciated!

    https://www.ads-software.com/plugins/mingle-forum/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Vanessa, I have the same problem with mingle forum, that Missing Argument message. Did you get it resolved?
    I don’t see any reply here. ??

    Thread Starter Vanessa

    (@vanessajaded)

    Hey BruceatArtsEd, unfortunately no ?? It’s still showing up for me and I asked another user who is still using Mingle Forum on an active site of theirs, but he said he never had this problem.

    this is from my working mingle forum

    function get_paged_threadlink($id, $postid = ''){
    		global $wpdb;
    		$wpdb->query("SELECT * FROM {$this->t_posts} WHERE parent_id = {$id}");
    		$num = ceil($wpdb->num_rows / $this->options['forum_posts_per_page']) - 1;
    		if($num < 0)
    			$num = 0;
    		if($this->options['forum_use_seo_friendly_urls'])
    		{
    			$group = $this->get_seo_friendly_title($this->get_groupname($this->get_parent_id(FORUM, $this->get_parent_id(THREAD, $id)))."-group".$this->get_parent_id(FORUM, $this->get_parent_id(THREAD, $id)));
    			$forum = $this->get_seo_friendly_title($this->get_forumname($this->get_parent_id(THREAD, $id))."-forum".$this->get_parent_id(THREAD, $id));
    			$thread = $this->get_seo_friendly_title($this->get_subject($id)."-thread".$id);
    			return rtrim($this->home_url, '/').'/'.$group.'/'.$forum.'/'.$thread.".".$num.$postid;
    		}
    		else
    			return $this->thread_link.$id.".".$num.$postid;
    	}
    Thread Starter Vanessa

    (@vanessajaded)

    @wbdesigner That worked! Thank you so much!

    Great! any chance you know where the admin email is generated from in mingle forum. I have set up a daily digest newsletter by cobbling together plugins “email to post” and “mailpoet” I want the email that mingle forum sends out to the adim to go to the “email to post” email address but I can’t seem to find it in the php edits.

    Thread Starter Vanessa

    (@vanessajaded)

    @wbdesigner I’m not sure, but try looking through wpf.php. According to this blog post, https://www.parorrey.com/blog/wordpress/send-new-topic-email-notifications-to-every-user-for-mingle-forum-plugin-v-1-0-33/, that’s where you can manipulate forum member notifications, so you might be able to change the admin notifications emails.

    @wbdesigner thanks for that..got me sorted

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Mingle Forum plugin returning a Warning message’ is closed to new replies.