Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Network activation means no blocks loaded on admin page #11

Closed
knutsp opened this issue Jan 10, 2019 · 4 comments
Closed

Network activation means no blocks loaded on admin page #11

knutsp opened this issue Jan 10, 2019 · 4 comments

Comments

@knutsp
Copy link

knutsp commented Jan 10, 2019

Tested on several multisite networks and if, and only if, network activated it does not load any blocks on admin Cloud Blocks page.

If activated per site it works, so it's not multisite related, but the type of activation. If per site activated first, then network activated later, it stops working, even if site activated on all the sites.

A script is not loaded on the admin page, it seems, but no console errors.

Only difference between network activation and site activation is the order of including the main plugin file, but haven't been able to find the actual reason for this strange behaviour by studying the code.

screenshot_2019-01-10 cloud blocks nettvendt wordpress

@foadyousefi
Copy link
Member

Thanks for reporting. Will look into it as soon as I can.

@foadyousefi
Copy link
Member

foadyousefi commented Jan 14, 2019

The issue was global variable $pagenow which was used to only load plugin assets if we are in the plugin settings page. This variable seems not to work with multisite setup, at least in our case. So replaced it with is_admin() function and changed plugin init function just a bit in version 1.1.2. This fixed the issue for me.

Can you please check and if it solved, close this issue?

Again thanks for reporting.

@foadyousefi
Copy link
Member

@knutsp I think the issue is solved. Can you please check and confirm?

@knutsp
Copy link
Author

knutsp commented Jan 21, 2019

Seems to work fine now. I can see the blocks on each site.

Thanks for fixing!

@knutsp knutsp closed this as completed Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants