Title: Cannot activate rules
Last modified: March 16, 2021

---

# Cannot activate rules

 *  [corpat](https://wordpress.org/support/users/corpat/)
 * (@corpat)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cannot-activate-rules/)
 * I can activate the plugin but once I try to activate one rule I get this error.
 * Using wordpress 5.7
 *     ```
       [16-Mar-2021 07:13:54 UTC] PHP Fatal error:  Uncaught Error: Call to a member function switch_to_locale() on null in /home3/mysite/public_html/wp-includes/l10n.php:1666
       Stack trace:
       #0 /home3/mysite/public_html/wp-admin/includes/misc.php(132): switch_to_locale('sv_SE')
       #1 /home3/mysite/public_html/wp-content/plugins/http-headers/http-headers.php(1272): insert_with_markers('/home3/mysite...', 'HttpHeaders', Array)
       #2 /home3/mysite/public_html/wp-content/plugins/http-headers/http-headers.php(755): update_headers_directives()
       #3 /home3/mysite/public_html/wp-includes/class-wp-hook.php(294): http_headers_option('_transient_time...')
       #4 /home3/mysite/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
       #5 /home3/mysite/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
       #6 /home3/mysite/public_html/wp-includes/option.php(626): do_action('added_option', '_transient_time...', 1615878894)
       #7 /home3/mysite/public_html/wp-includes/option.php(885): add_option('_transient_time...', 1615878894, '', 'no') in /home3/mysite/public_html/wp-includes/l10n.php on line 1666
       ```
   

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Dimitar Ivanov](https://wordpress.org/support/users/zinoui/)
 * (@zinoui)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cannot-activate-rules/#post-14189732)
 * Hi [@corpat](https://wordpress.org/support/users/corpat/)
 * Thank you for your bug report.
    I will try to reproduce and fix it.
 *  [smiley58](https://wordpress.org/support/users/smiley58/)
 * (@smiley58)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cannot-activate-rules/#post-14197353)
 * Hi [@zinoui](https://wordpress.org/support/users/zinoui/) ,
    here the same problem
   on several pages. Do you need more information to help you find and fix the problem?
   Regards Boris
 *  Plugin Author [Dimitar Ivanov](https://wordpress.org/support/users/zinoui/)
 * (@zinoui)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cannot-activate-rules/#post-14199186)
 * Hi [@smiley58](https://wordpress.org/support/users/smiley58/) and [@corpat](https://wordpress.org/support/users/corpat/)
 * After various tests I can’t reproduce this issue. Can I ask you to show the list
   of plugins you are using.
 * I’m curious whether both of you using some multilingual plugin.
 * Thanks
 *  [smiley58](https://wordpress.org/support/users/smiley58/)
 * (@smiley58)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cannot-activate-rules/#post-14199258)
 *     ```
       Active Plugins		
       All In One WP Security - 4.4.8	By Tips and Tricks HQ, Peter Petreski, Ruhul, Ivy	
       Antispam Bee - 2.9.4	By pluginkollektiv	
       BackWPup - 3.8.0	By Inpsyde GmbH	
       Better Search Replace - 1.3.4	By Delicious Brains	
       Borlabs Cookie - Cookie Opt-in - 2.2.22	By Benjamin A. Bornschein, Borlabs	
       Cache Enabler - 1.6.2	By KeyCDN	
       Classic Editor - 1.6	By WordPress Contributors	
       Elementor - 3.1.4	By Elementor.com	
       Elementor Pro - 3.2.0	By Elementor.com	
       Enable Media Replace - 3.5.0	By ShortPixel	
       Essential Addons for Elementor - 4.5.3	By WPDeveloper	
       Google Analytics for WordPress by MonsterInsights - 7.16.2	By MonsterInsights	
       HSTS Ready - 1.03	By Manu225	
       Post SMTP - 2.0.22	By Yehuda Hassine	
       Rank Math SEO - 1.0.59.1	By Rank Math	
       Rank Math SEO PRO - 2.3.1	By Rank Math	
       Shariff Wrapper - 4.6.5	By Jan-Peter Lambeck & 3UU	
       ShortPixel Image Optimizer - 4.21.2	By ShortPixel	
       Show Page URL - 1.0.0	By Smarter Websites	
       Wordfence Login Security - 1.0.6	By Wordfence	
       WP Force SSL - 1.57	By WebFactory Ltd
       ```
   
 *  [smiley58](https://wordpress.org/support/users/smiley58/)
 * (@smiley58)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cannot-activate-rules/#post-14199261)
 * hope this helps. if you have any further questions, please contact me.
    Regards
   Boris
 *  Thread Starter [corpat](https://wordpress.org/support/users/corpat/)
 * (@corpat)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cannot-activate-rules/#post-14199736)
 *     ```
       Bluehost Version 2.5.5
       Classic Editor Version 1.6
       Contact Form 7 Version 5.4
       Duplicate Page Version 4.4
       Elementor Version 3.1.4
       Elementor Pro Version 3.0.6 
       Google Analytics for WordPress from MonsterInsights Version 7.16.2 
       Google Tag Manager for WordPress Version 1.11.6
       HTTP Headers Version 1.18.1
       Password Protected Version 2.4
       TablePress Version 1.13
       Välj Wordfence Security Version 7.4.14
       WordPress Importer Version 0.7 
       WPML Media Version 2.6.3
       WPML Multilingual CMS Version 4.4.9
       WPML String Translation Version 3.1.7
       WPML Translation Management Version 2.10.5
       Yoast SEO Version 16.0.1
       ```
   
 *  Thread Starter [corpat](https://wordpress.org/support/users/corpat/)
 * (@corpat)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cannot-activate-rules/#post-14231942)
 * Seems like this is the plugins that we share.
 * Classic Editor Version 1.6
    Elementor Version 3.1.4 Elementor Pro Google Analytics
   for WordPress by MonsterInsights Wordfence Security
 * Have you been able to reproduce the issue to find a solution?
 *  [smiley58](https://wordpress.org/support/users/smiley58/)
 * (@smiley58)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cannot-activate-rules/#post-14242164)
 * ok, i’m slowly starting to test things out one by one now. so i don’t have to
   do this on a live site, i’ve installed a local web server. This of course means
   that the environment is not 100% the same. Elementor (incl. pro) seems to be 
   safe. it may take a few days, i have to do it on the side
    -  This reply was modified 5 years, 2 months ago by [smiley58](https://wordpress.org/support/users/smiley58/).
 *  Thread Starter [corpat](https://wordpress.org/support/users/corpat/)
 * (@corpat)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/cannot-activate-rules/#post-14292089)
 * Any findings yet?
 *  [smiley58](https://wordpress.org/support/users/smiley58/)
 * (@smiley58)
 * [5 years ago](https://wordpress.org/support/topic/cannot-activate-rules/#post-14420088)
 * unfortunately no, no time at the moment
 *  [Franz](https://wordpress.org/support/users/nauvaro/)
 * (@nauvaro)
 * [5 years ago](https://wordpress.org/support/topic/cannot-activate-rules/#post-14477518)
 * Possible conflict with the Indeed Ultimate Affiliate Pro plugin
 *     ```
       Uncaught Error: Call to a member function switch_to_locale() on null in /myserver/wp-includes/l10n.php:1666, referer: https://mysite.com/wp-admin/options-general.php?page=http-headers&header=x-frame-options
       Stack trace:, referer: https://mysite.com/wp-admin/options-general.php?page=http-headers&header=x-frame-options
       #0 /myserver/wp-admin/includes/misc.php(132): switch_to_locale('pt_BR'), referer: https://mysite.com/wp-admin/options-general.php?page=http-headers&header=x-frame-options
       #1 /myserver/wp-content/plugins/http-headers/http-headers.php(1330): insert_with_markers('/myserver/...', 'HttpHeaders', Array), referer: https://mysite.com/wp-admin/options-general.php?page=http-headers&header=x-frame-options
       #2 /myserver/wp-content/plugins/http-headers/http-headers.php(815): update_headers_directives(), referer: https://mysite.com/wp-admin/options-general.php?page=http-headers&header=x-frame-options
       #3 /myserver/wp-includes/class-wp-hook.php(294): http_headers_option('uap_test_cookie'), referer: https://mysite.com/wp-admin/options-general.php?page=http-headers&header=x-frame-options
       #4 /myserver/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array), referer: https://mysite.com/wp-admin/options-general.php?page=http-headers&header=x-frame-options
       #5 /myserver/wp-includes/plugin.php(484): WP_Hook->do_action(Array), referer: https://mysite.com/wp-admin/options-general.php?page=http-headers&header=x-frame-options
       #6 /myserver/wp-includes/option.php(486): do_action('updated_option', 'uap_test_cookie', '0', 1), referer: https://mysite.com/wp-admin/options-general.php?page=http-headers&header=x-frame-options
       #7 /myserver/wp-content/plugins/indeed-affiliate-pro/admin/UapMainAdmin.class.php(253): update_option('uap_test_c in /myserver/wp-includes/l10n.php on line 1666, referer: https://mysite.com/wp-admin/options-general.php?page=http-headers&header=x-frame-options
       ```
   
    -  This reply was modified 5 years ago by [Franz](https://wordpress.org/support/users/nauvaro/).

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Cannot activate rules’ is closed to new replies.

 * ![](https://ps.w.org/http-headers/assets/icon-128x128.png?rev=1413576)
 * [HTTP Headers](https://wordpress.org/plugins/http-headers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/http-headers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/http-headers/)
 * [Active Topics](https://wordpress.org/support/plugin/http-headers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/http-headers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/http-headers/reviews/)

 * 11 replies
 * 4 participants
 * Last reply from: [Franz](https://wordpress.org/support/users/nauvaro/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/cannot-activate-rules/#post-14477518)
 * Status: not resolved