Support » Plugin: Formidable Form Builder - Contact Form, Survey & Quiz Forms Plugin for WordPress » In some rare cases it conflicts and changes wordpress queries – disable to fix.

  • On some sites having this plugin enabled seriously changes WordPress some queries which will result in hard to debug errors.

    For example if you try

    $args = array(
    	'post_type' => 'attachment',
    	'post_status'=>'any',
    	'meta_query' =>array(array(
    		'key' => akeyhere,
    		'value' => avaluehere,
    		'compare' => '=',
    	))
    );
    var_dump( new WP_Query($args) )

    you will see with and without the plugin enabled there are very different queries and different results. It apparently is adding

     [1]=>
          array(2) {
            ["key"]=>
            string(9) "_frm_file"
            ["compare"]=>
            string(10) "NOT EXISTS"
          }
          ["relation"]=>
          string(3) "AND"

    to the query without permission, causing completely different results and hours of debugging fun!

    Update… seems this may be conflict with some combination of plugins, but this does happen on more than one site for me.

    • This topic was modified 4 years, 3 months ago by programmin.
    • This topic was modified 4 years, 3 months ago by programmin.
    • This topic was modified 4 years, 3 months ago by programmin. Reason: More coherent title, description of problem
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Steph Wells

    (@sswells)

    Where are you seeing this? The media shown on the media library is filtered to exclude the files uploaded in the form. Is that what you are seeing?

    Thread Starter programmin

    (@programmin)

    I’m having a hard time making a minimal testcase on local setup, but yes when enabled it changes the WP_Query(), possibly with a conflict with other plugin.

    I can’t seem to find that code but I did notice one part of the code calls a set_cache while query is filtered, possibly related?

     add_filter( 'posts_where' , 'FrmFormActionsController::limit_by_type' );
    		$query = self::action_args( $form_id, $limit );
            $query['post_status']      = 'any';
            $query['suppress_filters'] = false;
    
    		$actions = FrmAppHelper::check_cache( serialize( $query ) . '_type_' . $type, 'frm_actions', $query, 'get_posts' );
    Plugin Author Steph Wells

    (@sswells)

    The Pro version includes some filtering in FrmProFileField::filter_media_library(). We haven’t heard of anyone else having issues with this, so we would appreciate it if you could open a ticket in our help desk so we can help you track down the conflict.

    In the meantime, it would be great if you could update the rating on your review.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘In some rare cases it conflicts and changes wordpress queries – disable to fix.’ is closed to new replies.