Forums › Forums › Search & Filter Pro › Bug? Debug.log error message
Tagged: bug report, taxonomy
- This topic has 26 replies, 2 voices, and was last updated 9 years, 8 months ago by Ross.
-
Anonymous(Private) January 29, 2015 at 12:15 pm #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.
Ross Moderator(Private) January 29, 2015 at 4:05 pm #11140Hi 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(Private) January 29, 2015 at 6:11 pm #11149Hi 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(Private) January 29, 2015 at 7:42 pm #11150Hi 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(Private) January 30, 2015 at 12:40 pm #11177Yes 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…
Ross Moderator(Private) January 30, 2015 at 3:45 pm #11195Hi Laura
I think I’ve patched this issue – want me to send you the update to test?
Thanks
-
AuthorPosts