Plugin not compatible with Multisites
-
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_hookthat doesALTER TABLEbut only for the current site.The solutions that I think could solution
1)
inithook that add this table column, but also add some blog option likenamespace_init_doneso plugin on init check it, and if init wasn’t done, it simply runALTER 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 forwp_initialize_siteand runALTER TABLEfor the blog during init site.I hope this will help to improve this great plugin! 🙂
The topic ‘Plugin not compatible with Multisites’ is closed to new replies.