Forums Forums Search & Filter Pro Bug? Debug.log error message

Viewing 10 posts - 1 through 10 (of 27 total)
  • Anonymous
    #11117

    I noticed an entry in debug.log relating to search filter pro plugin:

    [29-Jan-2015 11:36:33 UTC] PHP Notice: Trying to get property of non-object in C:\xampp\htdocs\horsehawkv2\wp-content\plugins\search-filter-pro\public\includes\class-search-filter-display-shortcode.php on line 652

    Although the plugin does seem to be working, I am having issues with the ClassifiedEngine theme and several Taxonomies (custom fields) have disappeared. I don’t know if this is related, but it’s quite concerning as it’s a considerable amount of data…

    Line 652 corresponds to the line:

    
    $values['all_items_label'] = $taxonomydata->labels->all_items;
    

    in the following segment of code:

    
    private function get_taxonomy_field($field_data)
    	{
    		$returnvar = "";
    		
    		//set defaults so no chance of any php errors when accessing un init vars
    		$defaults = array(
    			'taxonomy_name'			=> '',
    			'input_type'			=> '',
    			'heading'				=> '',
    			'all_items_label'		=> '',
    			'operator'				=> '',
    			'show_count'			=> '',
    			'hide_empty'			=> '',
    			'hierarchical'			=> '',
    			'drill_down'			=> '',
    			'order_by'				=> '',
    			'order_dir'				=> '',
    			'exclude_ids'			=> '',
    			'sync_include_exclude'	=> '',
    			'combo_box'				=> ''
    		);
    		
    		$values = array_replace($defaults, $field_data);
    				
    		$taxonomydata = get_taxonomy($values['taxonomy_name']);
    		
    		if($values['all_items_label']=="")
    		{
    			$values['all_items_label'] = $taxonomydata->labels->all_items;
    		}
    

    What does this mean exactly and how can I fix it? Can anyone shed any light on this? Thanks.

    Anonymous
    #11139

    I’ve fixed the error message by upgrading Search and Filter to v1.4.0, but the data imported to CE Fields plugin from EngineThemes is still lost. Are these plugins just incompatible with each other, or is there some other explanation?

    Ross Moderator
    #11140

    Hi Laura

    I’m not sure how those plugins you are referencing work, but this plugin will not modify any data in your site (except for the S&F search forms) – this means that taxonomies and custom fields will never be altered by S&F

    I think your data loss is due to something else – try disabling S&F just as a test but I think you will find no difference…

    Thanks

    Anonymous
    #11149

    Hi Ross,

    I can’t think of any reason why S&F would modify site data either, it’s just that it’s the only plugin flagged up in the debug.log, so I thought I’d ask if there were any known incompatibilities with other plugins.

    As I imagined, disabling it doesn’t reinstate the data, although it might be useful to know what ‘Trying to get property of non-object’ means exactly. I’ll investigate the CE Fields plugin further though.

    Ross Moderator
    #11150

    Hi Laura

    Is this still coming up with the latest version?

    A user reported something similar, and the problem was that he was trying to access a taxonomy that didn’t exist in the front end of the site.

    Basically his taxonomies were being declared using some custom code he had written, and he was mistakenly only calling them in the admin section section of the site.

    Thanks

    Anonymous
    #11177

    Yes it’s still producing the same error message (now citing line 705) referring to the same line of code with the new version. I don’t think I have attempted to access a taxonomy that doesn’t exist; most of my mods have been visual, not functional so far, and nothing that others haven’t already done from what I’ve seen of the forums. When I replace my functions.php with a blank file, the error message still remains, so it doesn’t seem to be the culprit. I haven’t modified the plugin at all. I’m rather puzzled…

    Anonymous
    #11178

    SFP may not be responsible for my data loss, but there does seem to be some issue as when I deactivate the plugin, the error messages stop in debug.log. Ditto for the previous version.

    Ross Moderator
    #11195

    Hi Laura

    I think I’ve patched this issue – want me to send you the update to test?

    Thanks

    Anonymous
    #11271

    Great – yes please!

    Ross Moderator
    #11283

    Just sent to you.

    Thanks

Viewing 10 posts - 1 through 10 (of 27 total)