[wp-trac] [WordPress Trac] #39308: Invalid taxonomy error in WP 4.7

WordPress Trac noreply at wordpress.org
Fri Dec 16 17:31:11 UTC 2016


#39308: Invalid taxonomy error in WP 4.7
--------------------------+-----------------------------
 Reporter:  wpfo          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:  4.7
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Some plugins e.g 'more taxonomies' works not more properly in WP 4.7

 We get such an url
 /wp-admin/edit-tags.php?taxonomy=
 After click on such an url we get white screen with the message:
 Invalid taxonomy.

 Tested on Desktop (Host: Windows 8.1 update)
 Firefox: 50.0.2

 Error cause:
 'name' is not more set in $args array in function register_taxonomy()
 In WP 4.6.1:
 {{{#!php
 <?php
 $args['name'] = $taxonomy;
 }}}


 This should fix the problem:

 Set it again as below:

 In \wp-includes\class-wp-taxonomy.php
 In function set_props() insert this line:
 {{{#!php
 <?php
 $args['name'] = $this->name;
 }}}

 before the line:
 {{{#!php
 <?php
 foreach ( $args as $property_name => $property_value ) {
 }}}


 NOTE: I know that no one use this property in args list!
 In codex is even not mentioned that this property exists.
 But as we see some plugins uses it and there's really no reason to remove
 setting it.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39308>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list