• Hello!

    The filter in taxonomy-terms-order.php:145 affects the editing of WP navigation menus as well.

    As you probably know WP navigation menus is stored within the taxonomy table structure.

    Not really sure why, but this plugin made all the menus disappear from WP Admin when the plugin was active. Note that this was on a multisite setup, and it only happened on the sub-site, not the main site.

    I added the following code (in a MU-plugin) which removes the filter when editing the menus in WP Admin:

    // Prevent the plugin intervening when editing the nav menu in WP Admin
    add_action( 'current_screen', function() {
    
    	// Bail if not in WP Admin
    	if ( ! is_admin() ) {
    		return;
    	}
    
    	// Get current screen
    	$screen = get_current_screen();
    	if ( isset( $screen->id ) && $screen->id == 'nav-menus' ) {
    
    		// Remove filter
    		remove_filter( 'get_terms_orderby', 'TO_applyorderfilter', 10, 2 );
    	}
    
    } );

    It works like normal after adding this snippet.
    Hopefully this can help other who has the same problem.

    Is this something that should be implemented in the actual plugin?
    Should taxonomy terms ordering affect the editing of WP nav menus?

    Best regards,
    Robert S.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Maya

    (@tdgu)

    Hi Robert,
    Thanks for your feedback, we’ll try to reproduce the issue on this side and see what’s wrong.

    Thanks

    Hey there,

    This is because the term_order column is missing from the wp_N_terms table in the subsites of the multisite installation. This leads to a WP DB query error.

    If the plugin is Network Enabled the temr_order column is not created.

    You can get around this by enabling the plugin separately per each subsite instead of Network Enabling the plugin (disable then enable on existing sites). Obviously this is only a workaround for the time being.

    Hope this helps!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Taxonomy terms order affecting WP nav menu editing’ is closed to new replies.