• Hi, I posted here a couple months ago asking if this plugin could handle multisite networks. Since then I have had issues with the global settings resetting on their own and I can’t figure out why.

    Previously the subsites had their own SMTP settings, but now they all need to share the global settings and I didn’t want to go into each subsite (there are 100+) and alter the settings manually, which is why I wanted to use this plugin.

    However, in wp-admin/network/settings.php when I check “enable global settings” option, it never sticks for very long. This box keeps unchecking itself and on /network/index.php it always says “Postman is operating in per-site mode.” I’ve never seen it say anything else. I’ve also disabled “Allow user to load saved options”, but that resets as well.

    What are the possible reasons for this and how can I ensure it stays checked? Is this a functional feature?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter afoc

    (@afoc)

    I’ve done some more digging into trying to figure out why this is happening. Every ~5 minutes the network settings reset, I have watched this happen in the database, in the wp_sitemeta table, postman_network_options row.

    The only thing I can think of is for some reason the plugin is re-running its installer as if it is being newly activated, because in post-smtp/Postman/PostmanInstaller.php the default setting it keeps resetting to is seen here:

    
    if ( function_exists( 'is_multisite' ) && is_multisite() ) {
      $options['post_smtp_allow_overwrite'] = '1';
      update_site_option( PostmanOptions::POSTMAN_NETWORK_OPTIONS, $options );
      .... 
    }
    

    No other options are changed in the database except that one, and post_smtp_global_settings disappears from the database.

    Regarding the dashboard, I noticed that “per-site mode’ is the only possible display for that widget regardless of what state it is in. From Postman/Postman-Controller/PostmanDashboardWidgetController.php:

    
    /**
      * Create the function to output the contents of our Dashboard Widget.
    */
    public function printNetworkDashboardWidget() {
      printf ( '<p class="wp-menu-image dashicons-before dashicons-email"> %s</p>', __ ( 
       'Postman is operating in per-site mode.', Postman::TEXT_DOMAIN ) );
    }
    

    I’m interested in this topic also and adding this comment so I can follow. Thanks!

    Thread Starter afoc

    (@afoc)

    For the record, I solved this issue by directly editing the part I pasted from PostmanInstaller.php to read $options['post_smtp_global_settings'] = '1'; instead of post_smtp_allow_overwrite. That way the default is the value I want regardless of whether or not it keeps resetting.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Enable global settings option keeps resetting in multisite’ is closed to new replies.