Warnings & Errormessages

SSL activated! message not going away

After activation of SSL in Really Simple SSL, there’s a success message that confirms your site has been migrated to https.

SSL activated! Don’t forget to change your settings in Google Analytics en Webmaster tools. More info.

When the x in the right top is clicked, an ajax call is fired that sets the “success message show” variable to true. Some users report that the message keeps coming back. I haven’t been able to reproduce this yet, but my guess is that there’s a javascript error on the dashboard, caused by another plugin, or the theme, which breaks the ajax callback.

On the wishlist I’ve added the option to dismiss it in the traditional way, with a submit. For now, there’s a workaround you can use to remove the notice.
Add this you your theme’s functions.php:

add_action("init", "rsssl_dismiss_success_message");

function rsssl_dismiss_success_message(){

  $options = get_option('rlrsssl_options');

  $options['ssl_success_message_shown'] = true;

  update_option('rlrsssl_options',$options);

}

After loading your site once, the message should go away, then you can remove this code.

For multisite this would be:

add_action("init", "rsssl_dismiss_success_message");
function rsssl_dismiss_success_message(){
 $sites = get_sites();
 foreach ( $sites as $site ) {
  switch_to_blog( $site->blog_id );
  $options = get_option('rlrsssl_options');   
  $options['ssl_success_message_shown'] = true;   
  update_option('rlrsssl_options',$options);
  restore_current_blog(); //switches back to previous blog, not current, so we have to do it each loop
 }
}

Related Articles

Leave a Comment