Ross

Forum Replies Created

Viewing 10 posts - 201 through 210 (of 10,351 total)
  • Ross Moderator in reply to:
    How to change search results sort order
    #272284
    This reply has been marked as private.
    Ross Moderator in reply to:
    Blank options appear in search filter
    #272280

    Hi Keith

    We have a filter here for modifying all input fields:
    https://gist.github.com/rmorse/7b59b45a14b1ca179868

    Essentially, the only part you need from that is you need to loop through the options:

    function remove_empty_options($input_object, $sfid ) {
    
    	//ensure we are only filtering the correct field name - in this case the field we want to filter has the name <code>_sfm_attorneys</code>
    	if(($input_object['name']!='_sfm_attorneys')){
    		return $input_object;
    	}
    	
    	if(!isset($input_object['options'])) {
    		return $input_object;
    	}
    	$new_options = array();
    	foreach($input_object['options'] as $option) {
    		if ( trim( $option->label ) !== '' ) {
    			array_push( $new_options, $option );
    		}
    	}
    	$input_object['options'] = $new_options;
    	return $input_object;
    }
    add_filter('sf_input_object_pre', 'remove_empty_options', 10, 2);

    I haven’t actually tested this, but it looks to be correct.

    You will need some PHP development skills to modify – that should go in your child themes functions.php.

    Best

    Ross Moderator in reply to:
    Trouble With Results Showing Up
    #272278
    This reply has been marked as private.
    Ross Moderator in reply to:
    Filtering only working with the last variation loaded per product in Woocommerce
    #272242

    Hi Leopoldo

    I’m having a look a this – I’m going to test if I can recreate this locally.

    I will update tomorrow with my findings.

    Best

    Ross Moderator in reply to:
    HTTP Error 500
    #271945

    Hi Alex

    Ok so I see the issue…

    The problem we have sometimes with our plugin, is that when you load our search form edit page, we have to load all the post meta keys on your site at once – to popuplate the dropdown (we should do that with ajax, but that won’t solve this issue).

    The issue is in fact how many individual post meta keys you have. This is with woocommerce enabled (and all other plugins disabled):
    https://snipboard.io/m4sH2j.jpg
    That shows over 38,000 meta keys! The browser doesn’t like to load a dropdown list with so many entries… This is whats causing the slowdown on the page (when dragging items, clicking anything)

    And when you get a 500 error when loading the admin page, I think thats because server resources / mysql limitations have been reached (we’ve effectively done a mysql query for over 40,000 records on every page load of the search form edit screen).

    The question is, why do you have so many unique entires? That is tons of data assigned to your post meta… I’ve never seen anything quite like this!

    Also, I tried without woocommerce, and I still see around 40,000 meta keys! So I think woocommerce has nothing to do with the issue (and the meta data is not stored on the products) – I think it is jsut a co-incidence that it was failing at that point (because WooCommerce takes up additional server resources).

    So, I’m thinking, how do we clear up all this post meta – do you know where it is coming from / what it’s used for?

    Best

    Ross Moderator in reply to:
    HTTP Error 500
    #271910

    Hi Alex

    Apologies for the delay. This ticket is now my priority.

    Can you give me exact steps to reproduce the issue on the dev site?

    The forms I see on the dev site now seem to be working ok?

    Thanks

    Ross Moderator in reply to:
    Trouble With Results Showing Up
    #271902
    This reply has been marked as private.
    Ross Moderator in reply to:
    Empty Custom Fields break filters
    #271900

    Hey Evan

    Do you mean in the admin, where you choose the meta key, but if no content is associated, the meta key simply does not appear?

    There is no way to improve this for native WP post meta (as a key doesn’t exist until used / created) however for the ACF plugin, we are adding better support (so we will list their fields as options) regarless if they have yet been in use.

    I hope that makes sense

    Best

    Ross Moderator in reply to:
    Filter without a (visible) form
    #271896
    This reply has been marked as private.
    Ross Moderator in reply to:
    S&F looking for a page with %tax% in the slug
    #271887
    This reply has been marked as private.
Viewing 10 posts - 201 through 210 (of 10,351 total)