• Resolved midwestdev

    (@midwestdev)


    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

    (@philsbury)

    Hi @midwestdev,

    This is fixed in the latest release.

    The customizer section should be available by default, unless it’s been removed via hooks as far as I know.

    Thanks,
    Phil

    Plugin Author Phil

    (@philsbury)

    Hi @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 2 years, 3 months ago by Phil. Reason: Better example!
    Thread Starter midwestdev

    (@midwestdev)

    Hi @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

    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

    (@philsbury)

    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

    (@midwestdev)

    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.