Title: Error while attempting to save Access rules
Last modified: December 13, 2022

---

# Error while attempting to save Access rules

 *  Resolved [midwestdev](https://wordpress.org/support/users/midwestdev/)
 * (@midwestdev)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error-while-attempting-to-save-access-rules/)
 * Hey there, just wanted to let you know that I encountered an error while trying
   to save access rules, I double checked it again by going in and attempting to
   change access rules and saving. Here’s what I get from WordPress:
 *     ```
       WordPress version 6.1.1
       Active theme: Custom Theme (version 1.0)
       Current plugin: Age Gate (version 3.1.1)
       PHP version 8.1.13
   
       Error Details
       =============
       An error of type E_ERROR was caused in line 171 of the file /www/wp-content/plugins/age-gate/vendor/asylum/validation/src/Validator.php. Error message: Uncaught TypeError: Asylum\Validation\Validator::is_valid(): Argument #1 ($data) must be of type array, null given, called in /www/wp-content/plugins/age-gate/src/Admin/Controller/AccessController.php on line 46 and defined in /www/wp-content/plugins/age-gate/vendor/asylum/validation/src/Validator.php:171
       Stack trace:
       #0 /www/wp-content/plugins/age-gate/src/Admin/Controller/AccessController.php(46): Asylum\Validation\Validator::is_valid(NULL, Array)
       #1 /www/wp-content/plugins/age-gate/vendor/agegate/common/src/Admin/AbstractController.php(73): AgeGate\Admin\Controller\AccessController->store(Array)
       #2 /wordpress/wp-includes/class-wp-hook.php(308): AgeGate\Common\Admin\AbstractController->AgeGate\Common\Admin\{closure}('')
       #3 /wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
       #4 /wordpress/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
       #5 /wordpress/wp-admin/admin-post.php(85): do_action('admin_post_age_...')
       #6 {main}
       thrown
       ```
   
 * Also, I couldn’t access the custom CSS through the customizer like your instructions
   said. The theme is custom, and I’m a developer, is there anything extra I need
   to do to get that back?

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

 *  Plugin Author [Phil](https://wordpress.org/support/users/philsbury/)
 * (@philsbury)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error-while-attempting-to-save-access-rules/#post-16286782)
 * Hi [@midwestdev](https://wordpress.org/support/users/midwestdev/),
 * This is fixed in the latest release.
 * The customizer section should be available by default, unless it’s been removed
   [via hooks](https://wordpressdeveloperonline.com/remove-additional-css-from-the-wordpress-customizer/)
   as far as I know.
 * Thanks,
    Phil
 *  Plugin Author [Phil](https://wordpress.org/support/users/philsbury/)
 * (@philsbury)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error-while-attempting-to-save-access-rules/#post-16286870)
 * Hi [@midwestdev](https://wordpress.org/support/users/midwestdev/),
 * Looks like my info was wrong (even though it came from the plugin team!)
 * Block themes no longer show the customizer by default, which is a bit of a pain!
 * You can get it back with this code though:
 *     ```
         // restore customizer
         add_action('customize_register', '__return_true');
       ```
   
 * (code edited from a previous bloated version!)
 * Thanks
    Phil
    -  This reply was modified 3 years, 5 months ago by [Phil](https://wordpress.org/support/users/philsbury/).
      Reason: Better example!
 *  Thread Starter [midwestdev](https://wordpress.org/support/users/midwestdev/)
 * (@midwestdev)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error-while-attempting-to-save-access-rules/#post-16289654)
 * Hi [@philsbury](https://wordpress.org/support/users/philsbury/),
 * Thanks, I can verify that my initial issue is fixed, but as for the customizer,
   I maybe should have been a little clearer, the customizer is there, but I don’t
   see a dedicated area in for Age Gate’s CSS anywhere, and it’s not in any of the
   dropdowns there.
 * > [View post on imgur.com](https://imgur.com/RTEEp6c)
 * The site shouldn’t be using the customizer in any strange way, either, as far
   as I know.
 * Just in case, I did add your code in, but it didn’t change anything of note. 
   Let me know if there’s another solution you’d like me to try. Thanks!
 *  Plugin Author [Phil](https://wordpress.org/support/users/philsbury/)
 * (@philsbury)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error-while-attempting-to-save-access-rules/#post-16289759)
 * Ah, sorry! It just uses the built-in “Additional CSS” one now as our own css 
   editor was disallowed as it duplicated built in features.
 * Thanks
    Phil
 *  Thread Starter [midwestdev](https://wordpress.org/support/users/midwestdev/)
 * (@midwestdev)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error-while-attempting-to-save-access-rules/#post-16290337)
 * Alright, sorry it wasn’t entirely clear if it was going to have it’s own space
   in the customizer so that it only loads when the Age Gate loads or not. Appreciate
   the info, thanks.

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

The topic ‘Error while attempting to save Access rules’ is closed to new replies.

 * ![](https://ps.w.org/age-gate/assets/icon-256x256.png?rev=2783003)
 * [Age Gate](https://wordpress.org/plugins/age-gate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/age-gate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/age-gate/)
 * [Active Topics](https://wordpress.org/support/plugin/age-gate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/age-gate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/age-gate/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [customizer](https://wordpress.org/support/topic-tag/customizer/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 5 replies
 * 2 participants
 * Last reply from: [midwestdev](https://wordpress.org/support/users/midwestdev/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/error-while-attempting-to-save-access-rules/#post-16290337)
 * Status: resolved