WordPress.org

Ready to get started?Download WordPress

Forums

TC Custom Taxonomy Filter
Debug errors - lines 27 & 37 (2 posts)

  1. iso200
    Member
    Posted 1 year ago #

    I'm getting the following errors when I have this plugin installed and go to wordpress/wp-admin/edit.php :

    Notice: Undefined index: country in /Volumes/Users/me/Sites/MAMP/local_test/wordpress/wp-content/plugins/tc-custom-taxonomy-filter/tc-custom-taxonomy-filter.php on line 27

    Notice: Trying to get property of non-object in /Volumes/me/me/Sites/MAMP/local_test/wordpress/wp-content/plugins/tc-custom-taxonomy-filter/tc-custom-taxonomy-filter.php on line 37

    Adding the following before and after line 27 sorts this:
    if (!isset($wp_query->query_vars[$tax_slug])) $wp_query->query_vars[$tax_slug] = "";
    $term = get_term_by( 'slug', $wp_query->query_vars[$tax_slug], $taxonomy->name );
    if (!isset($term->term_id)) $term->term_id = 0;

    solves this for me.
    Dave

    http://wordpress.org/extend/plugins/tc-custom-taxonomy-filter/

  2. Tracy Rotton
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the heads up.

    While your code does solve the errors that are viewable, it leaves an empty select element, which I don't think looks very good. I'll work on fixing both of these issues and having an update in a few days.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic