WordPress: Let's notice plug-ins for multi-sites!!

Other language site
ja ja
Google Translate
  • -

    シェア
  • ---

    LINEで送る
  • -

    はてなブックマーク
    ブックマーク
  • -

    pocket
  • -

    rss
WordPress logo

I could not add menus with "Appearance -> Menus" in WordPress' s multi - site subsite. Moreover, a phenomenon which can not be edited occurred.

The cause was in the Category Order and Taxonomy Terms Order plug-in.

Details of the cause and how to deal with it.

Why can not I edit the menu of the subsite?

I decided to edit the menu with the theme of the subsite.

And I added a menu as usual.

A strange phenomenon occurred here.

I created a menu with "Appearance -> Customize -> Menus" and switched to another management screen.

When I return to the menu setting screen again, the menu I created earlier is not displayed.

The menu returned to the initial state before setting again.

Also, in the "Appearance -> Menus", even if you add a new menu, its contents will not be reflected in the management screen.

Also, I could not edit the menu at all.

If you look closely, there is no "Manage Locations" tab.

Looking at the log of php, a database error occurred.

Database error that occurred

WordPress database error Unknown column 't.term_order' in 'order clause' for query SELECT t.*, tt. * FROM wp_2_terms AS t INNER JOIN wp_2_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('nav_menu') AND t.name IN ('●●●') ORDER BY t.term_order ASC LIMIT 1 made by include('wp-blog-header.php'), include( 'wp-load.php'), include('/●●●/wp-config.php'), include('wp-settings.php'), do_action('wp_loaded'), WP_Hoo k->do_action, WP_Hook->apply_filters, WP_Customize_Manager->wp_loaded, do_action('customize_register'), WP_Hook->do_acti on, WP_Hook->apply_filters, WP_Customize_Nav_Menus->customize_register, wp_get_nav_menu_items, wp_get_nav_menu_object, g et_term_by, get_terms, WP_Term_Query->query, WP_Term_Query->get_terms

The content of the error is that processing can not be done because there is no "term_order" column in "wp_2_terms" table.

The cause is in how to activate the plug-in of the subsite

When I created a subsite, I first stopped all the plug-ins from the site network management plug-in, and added the subsite.

Next, we activated the plug-in of the subsite again by enabling it on the plugin setting screen of the site network management.

Here was my mistake.

Category Order and Taxonomy The Terms Order plugin adds a "term_order" column to the "wp_terms" table in the database.

However, in the previous method, it was not added to the "wp_terms" table ("wp_2_terms") of the subsite.

Workaround

Activate the first plug-in when creating a subsite is executed within the subsite

The first thing I suspected is that columns are not added to the database table because the method of enabling the first plugin is incorrect.

So we stopped the Category Order and Taxonomy Terms Order plugin from the network management screen.

Next, we moved to the plugin setting screen of the subsite, and activated this plugin there.

Then the "term_order" column was added to the "wp_2_terms" table.

The problem was solved.

Conclusion

The first plug-in activation of the subsite must be done at each site.

This time it occurred in one plugin, plugins that make changes to existing databases are expected to have similar bugs.

Changing the plug-in of the subsite that was activated at the subsite first so that it can be managed collectively by the network management plug-in is not a problem.

SNS also distributes articles.

コメント

  1. Nir says:

    Thanks! You've helped me with the same issue 🙂

    1. tadaya says:

      I am glad to be of your help.

Leave a Reply

*

If you like this article, share it!