• Resolved Mirco Babini

    (@mirkolofio)


    Check this line:

    'post_type' => $taxonomy_object -> object_type[ 0 ],

    Sometimes ->object_type is an empty array, this cause fatals.

    To reproduce the issue:
    – register a taxonomy with no CPT associated (pass NULL)
    – create a term for that taxonomy named “Test”
    – now search for Test in Admin Search, you will get 500 in ajax.php.

    null – Setting explicitly to null registers the taxonomy but doesn’t associate it with any objects, so it won’t be directly available within the Admin UI. You will need to manually register it using the ‘taxonomy’ parameter (passed through $args) when registering a custom post_type (see register_post_type()), or using register_taxonomy_for_object_type().

    From https://developer.www.ads-software.com/reference/functions/register_taxonomy/

  • The topic ‘Fatal error in ajax.php line 484’ is closed to new replies.