WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#10876 closed defect (bug) (invalid)

Problem with wp init routine or simple-tags bug?

Reported by: repley Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: taxonomy.php, init, simple-tags
Focuses: Cc:

Description

Hi, with wp2.8.4 the simple-tag 1.6.6 plugin don't works.
Commenting lines 17,21 and 22 of wp-includes/taxonomy.php solve the problem.

Original code (wp-includes/taxonomy.php):

function create_initial_taxonomies() {

register_taxonomy( 'category', 'post', array('hierarchical' => true, 'update_count_callback' => '_update_post_term_count', 'label' => ('Categories'), 'query_var' => false, 'rewrite' => false) ) ;
register_taxonomy( 'post_tag', 'post', array('hierarchical' => false, 'update_count_callback' => '_update_post_term_count', 'label' =>
('Post Tags'), 'query_var' => false, 'rewrite' => false) ) ;
register_taxonomy( 'link_category', 'link', array('hierarchical' => false, 'label' => ('Categories'), 'query_var' => false, 'rewrite' => false) ) ;

}

add_action( 'init', 'create_initial_taxonomies', 0 ); highest priority

modified code (wp-includes/taxonomy.php):

function create_initial_taxonomies() {

register_taxonomy( 'category', 'post', array('hierarchical' => true, 'update_count_callback' => '_update_post_term_count', 'label' => ('Categories'), 'query_var' => false, 'rewrite' => false) ) ;
register_taxonomy( 'post_tag', 'post', array('hierarchical' => false, 'update_count_callback' => '_update_post_term_count', 'label' =>
('Post Tags'), 'query_var' => false, 'rewrite' => false) ) ;
register_taxonomy( 'link_category', 'link', array('hierarchical' => false, 'label' => ('Categories'), 'query_var' => false, 'rewrite' => false) ) ;

}

add_action( 'init', 'create_initial_taxonomies', 0 ); highest priority

I don't know if it's a bug of wordpress init routine or a simple-tags bug, but i think that it's important to submit to developers.

Thread on wordpress support forum is the following:
http://wordpress.org/support/topic/315611

Thank you all

Change History (4)

comment:1 repley5 years ago

... or is better to change line 22 from:

add_action( 'init', 'create_initial_taxonomies', 0 ); highest priority

to (like lines 534 of wp-settings.php):

create_initial_taxonomies();

comment:2 dd325 years ago

  • Milestone Unassigned deleted
  • Resolution set to invalid
  • Status changed from new to closed

Sounds like the plugin needs updating to work with the latest version of WordPress.

The taxonomy adding code was made like that so that things could be translated IIRC, As long as the plugin is running its code on the init hook (rather than on plugin include) then generally things should work well.

Please submit the bug reports to the plugins author.

comment:3 hakre5 years ago

Please report the error you got back to the plugin's author. That might help her or him to develop the plugin.

comment:4 repley5 years ago

Author has been notified. Thank you for the fast reply

Note: See TracTickets for help on using tickets.