• Hi,

    I noticed this plugin does not work with multisites.
    Simply it will work on the main site. But categories are broken on all other sub sites.
    If you enter category, the list is empty, also posts are showed in admin without categories.

    The issue is ONLY if plugin was NETWORK ACTIVATED
    If you activate plugin directly from the site, it will work correctly.

    Looks like the issue is plugin hook on register_activation_hook that does ALTER TABLE but only for the current site.

    The solutions that I think could solution

    1) init hook that add this table column, but also add some blog option like namespace_init_done so plugin on init check it, and if init wasn’t done, it simply run ALTER table.

    2) is_multisite() check in activation, if activation, get all sites, and run ALTER TABLE each the site. You can use switch_blog function and re-init $wpdb, or use simply $wpdb->set_blog_id($blogID); to switch db blogs. Then add hook for wp_initialize_site and run ALTER TABLE for the blog during init site.

    I hope this will help to improve this great plugin! ??

    • This topic was modified 3 years, 5 months ago by Isu.
Viewing 1 replies (of 1 total)
  • Thread Starter Isu

    (@isuke01)

    Update:
    Actualy I needed the solution so I made one
    https://gist.github.com/isuke01/4e8e6c149d820fec67385ff995e7377f
    This is just updated file taxonomy-terms-order.php for Multisite support and network activated plugin support.

    I changed activation function in the plugin so it now checks if plugin is activated on the site or in multisite with multisite activation.

    • This reply was modified 3 years, 5 months ago by Isu.
Viewing 1 replies (of 1 total)
  • The topic ‘Plugin not compatible with Multisites’ is closed to new replies.