You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method CMB_Meta_Box::save() assumes it runs in a site context it was initialized in. That means if any other component runs a switch_to_blog() and triggers the save_post action, your plugin writes data to a wrong object (in a wrong site). This already leads to concrete issues.
However, this is easy to solve by just adding the following guard to your save_post handler:
if ( is_multisite() && ms_is_switched() )
return;
If appreciated I would provide a pull request.
The text was updated successfully, but these errors were encountered:
The method CMB_Meta_Box::save() assumes it runs in a site context it was initialized in. That means if any other component runs a
switch_to_blog()
and triggers thesave_post
action, your plugin writes data to a wrong object (in a wrong site). This already leads to concrete issues.However, this is easy to solve by just adding the following guard to your
save_post
handler:If appreciated I would provide a pull request.
The text was updated successfully, but these errors were encountered: