• Resolved travelitaeu

    (@travelitaeu)


    Hello, i encountered critical error on my page when testing level upgrade after 1 day

    Maybe my fault,so i am asking – i created platinum level with access to category platinum, and it worked with post in that category. Then i created second post, with access only for platinum members after 1 day membership:

    [restrict level=”platinum” drip_days=”1″]
    This content can only be seen by users who has had Platinum level for at least 1 day
    [/restrict]

    and its giving me error below. But only for user which is member of platinum – admin can read text, and user without membership is correctly redirected to set tease&include page…

    Did I do anything wrong or forgot to do something more to get correct behavior – redirect before time, and access when time is right? Thanks, Peter

    WP on 6.03, plugin on 2.4.

    Warning: Illegal offset type in isset or empty in /disk_1/www/cz/chrysalis/www/wp-content/plugins/restrict-user-access/helpers/collection.php on line 76
    
    Fatal error: Uncaught Error: Call to a member function get_start() on null in /disk_1/www/cz/chrysalis/www/wp-content/plugins/restrict-user-access/level.php:225 Stack trace: #0 /disk_1/www/cz/chrysalis/www/wp-includes/shortcodes.php(356): RUA_Level_Manager->shortcode_restrict(Array, '<br />\nThis con...', 'restrict') #1 [internal function]: do_shortcode_tag(Array) #2 /disk_1/www/cz/chrysalis/www/wp-includes/shortcodes.php(228): preg_replace_callback('/\\[(\\[?)(restri...', 'do_shortcode_ta...', '<p><code>[restr...') #3 /disk_1/www/cz/chrysalis/www/wp-content/plugins/all-in-one-seo-pack/app/Common/Traits/Helpers/Shortcodes.php(136): do_shortcode('<p><code>[restr...') #4 /disk_1/www/cz/chrysalis/www/wp-content/plugins/all-in-one-seo-pack/app/Common/Traits/Helpers/Shortcodes.php(70): AIOSEO\Plugin\Common\Utils\Helpers->doShortcodesHelper('<p><code>[restr...', Array, 0) #5 /disk_1/www/cz/chrysalis/www/wp-content/plugins/all-in-one-seo-pack/app/Common/Traits/Helpers/WpContext.php(231): AIOSEO\Plugin\Common\Utils\Helpers->doSho in /disk_1/www/cz/chrysalis/www/wp-content/plugins/restrict-user-access/level.php on line 225
    There has been a critical error on this website.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Joachim Jensen

    (@intoxstudio)

    Thank you for reporting this, and definitely not your fault, I can confirm it’s a bug.

    I will make sure this is fixed in the next update, but it will be some days before a release is ready. In the meantime, if you are able to edit PHP files, you can fix it like this:

    In wp-content\plugins\restrict-user-access\level.php, find line 225 and replace

    
    $start = $user->level_memberships()->get($level)->get_start();
    
    

    with

    
    $start = $user->level_memberships()->get($level->ID)->get_start();
                                
    
    Plugin Author Joachim Jensen

    (@intoxstudio)

    This has been fixed in version 2.4.1. Thank you again for reporting it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘critical error on drip content’ is closed to new replies.