• Resolved KTS915

    (@kts915)


    Thanks very much for this plugin!

    After upgrade to WP 4.0, I am now getting these notices in Query Monitor:

    Undefined variable: taxonomy
    wp-content/plugins/custom-taxonomy-order-ne/customtaxorder.php:421	
    
    Undefined variable: taxonomy
    wp-content/plugins/custom-taxonomy-order-ne/customtaxorder.php:422	
    
    Undefined variable: taxonomy
    wp-content/plugins/custom-taxonomy-order-ne/customtaxorder.php:424

    https://www.ads-software.com/plugins/custom-taxonomy-order-ne/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hello Again :).

    I’m not sure what is happening exactly. Which function do you call to retrieve the terms?

    In the code it should test if the list of terms is empty, and if so, just return it.
    Ans also if there’s no taxonomy set in the term, it will also just return the terms.
    So I’m not sure how the code finds that the $taxonomy variable is not set, it should return before that.

    Also, I haven’t been able to reproduce it in my test-setup and an empty test-setup. So I must be missing something :).

    Plugin Author Marcel Pol

    (@mpol)

    BTW, I used this code to test:

    ` $object_ids = array(1, 4);
    $taxonomies = array(‘category’);
    $args = array(‘fields’ => ‘all’);
    //$objects = wp_get_object_terms( $object_ids, $taxonomies, $args );
    $objects = get_objects_in_term( $object_ids, $taxonomies, $args );

    var_dump($objects);`

    The first function gives the list as the plugin want it and sorts it, the other gives just a list of the ids, and will just get returned.

    Thread Starter KTS915

    (@kts915)

    Marcel,

    Hello again, and thanks for this!

    I am afraid that I do not code, so cannot properly answer your question about which function I use to call it.

    However, I have been trying to see what makes it appear, and I have found that it only seems to show when I am in the back-end, using a plugin called Anspress, and then only when I click on “All Questions”.

    That is particularly curious, because when I followed those steps before upgrading to WP4, Query Monitor would show PHP Notices for Anspress (which I reported to the developer who, like you, is very good at responding, but who couldn’t replicate the issue). Now it is showing them for your plugin. How weird!

    Plugin Author Marcel Pol

    (@mpol)

    Hi,

    I installed Anspress in an old test-install and a new install, but I don’t see the PHP Notices. I’m sorry.

    Maybe you can email me an sql dump of your database? I would care to try it with that.
    My email is marcel at timelord.nl

    Regards,
    Marcel

    Thread Starter KTS915

    (@kts915)

    Thank you for exploring this. Do you need the whole database, or just a specific table?

    Plugin Author Marcel Pol

    (@mpol)

    Ohh, if it’s not too big I would prefer the whole database. Otherwise maybe just wp_options? But preferrably the whole database.

    If there’s too much info, you could leave the users and the posts out.

    Thread Starter KTS915

    (@kts915)

    The whole database is huge. But I have now sent you an email with several tables.

    Thanks for exploring this further!

    Plugin Author Marcel Pol

    (@mpol)

    Thank you for sending part of the database.
    I’m not able to reproduce the Notice though. I’m sorry for that.

    I’m not sure how to proceed. Maybe just assume it is a local issue, and maybe a conflict with another plugin?

    Thread Starter KTS915

    (@kts915)

    Well, it’s not a conflict with another plugin or my theme. I have tried deactivating all other plugins, and switching to 2014, but the problem remained.

    Could it be to do with the version of PHP I’m running (namely 5.5 or, more specifically, 5.5.9-1ubuntu4.4)?

    Thanks anyway for looking into it!

    Plugin Author Marcel Pol

    (@mpol)

    Would you care to add this version of the plugin?
    It’s the latest with just some debugging output.
    And could you then send me the html-source of the All-Questions page?

    https://timelord.nl/tmp/custom-tax-order.zip

    Btw, I don’t use Ubuntu, but Debian unstable with PHP 5.6. I wouldn’t expect that to be an issue.

    Thread Starter KTS915

    (@kts915)

    I have installed this version but, upon activation, I get this output above the header on the front-end and immediately below the admin bar on the back-end:

    current_filter: get_terms
    terms: array(3) { [0]=> object(stdClass)#456 (10) { ["term_id"]=> string(2) "20" ["name"]=> string(6) "Footer" ["slug"]=> string(6) "footer" ["term_group"]=> string(1) "0" ["term_order"]=> string(1) "0" ["term_taxonomy_id"]=> string(2) "20" ["taxonomy"]=> string(8) "nav_menu" ["description"]=> string(0) "" ["parent"]=> string(1) "0" ["count"]=> string(1) "2" } [1]=> object(stdClass)#344 (10) { ["term_id"]=> string(2) "19" ["name"]=> string(6) "Header" ["slug"]=> string(6) "header" ["term_group"]=> string(1) "0" ["term_order"]=> string(1) "0" ["term_taxonomy_id"]=> string(2) "19" ["taxonomy"]=> string(8) "nav_menu" ["description"]=> string(0) "" ["parent"]=> string(1) "0" ["count"]=> string(2) "11" } [2]=> object(stdClass)#343 (10) { ["term_id"]=> string(2) "31" ["name"]=> string(6) "Mobile" ["slug"]=> string(6) "mobile" ["term_group"]=> string(1) "0" ["term_order"]=> string(1) "0" ["term_taxonomy_id"]=> string(2) "31" ["taxonomy"]=> string(8) "nav_menu" ["description"]=> string(0) "" ["parent"]=> string(1) "0" ["count"]=> string(1) "1" } }
    
    current_filter: wp_get_object_terms
    terms: array(0) { }
    Thread Starter KTS915

    (@kts915)

    I’ve just now also emailed you the source html of the All Questions page.

    Thanks!

    Plugin Author Marcel Pol

    (@mpol)

    And without de-activating and activating?
    You would just need to replace the existing version.

    Oh, ok, thanks ??

    Plugin Author Marcel Pol

    (@mpol)

    Thank you.
    Strangely enough I had the same notices now.
    Can you try again from the same url?
    https://timelord.nl/tmp/custom-tax-order.zip

    Thread Starter KTS915

    (@kts915)

    That seems to have fixed it. Thank you very much!

    I hope it didn’t take too long!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘PHP Notices’ is closed to new replies.