I’ve been using the code snippets plugin to run some snippets on child sites. Up until today MainWP always knew which sites had the snippets installed on (yet still runs a check before adding the snippet to new sites). Now, the list was blank after loading the snippet. This “break” happened after I tried to run the snippet on some sites using a tag. I selected the tag, the snippets were installed… but now I have no idea which sites have them. Anytime tags (site tags) are used things break… I’ve tested this again.
This is really frustrating as I don’t know which sites now have the snippets running on them!
If I run the snippets again, will they be added twice to a site?
I loaded the snippets (previously applied sites were ticked)
I selected a tag and saved the snippet. Everything happened as it usually did
I reloaded the snippet the next day, no sites were selected
I was only using one snippet in my example, so perhaps try to test with that? Also, I had to come up with a solution so I ran the snippet on all sites for now. The question I still have is: Will snippets get added multiple times to each site? Or just once?
There is indeed a visual problem when using the same snippet across a selection of child sites and a selection of tags.
For example, if you:
Load a snippet and execute it on a selection of sites
Load the same snippet and execute it on a selection of tags
Load the same snippet again, only the tags will be selected in the sidebar
And if you were to switch between the Sites and Tags in the sidebar, the selection for both will be cleared.
I’ve passed this along to the development team.
However, the snippet will not be added multiple times.
So if you were to execute a snippet for a child site and then for a Tag that includes that child site, the snippet will be added to the DB only once.