Support » Plugin: Inactive Logout » Fatal error: Uncaught Error

  • Hi j_3rk,

    Firstly, fantastic plugin! It’s coming in very useful for our membership site.

    I am, however, having a slight issue.

    My site is using MemberPress and AffiliateWP. I believe there may be a conflict with Inactive Logout and AffiliateWP.

    When a user fills out the affiliate registration form and hits submit, they’re given the following error:

    ————–

    Fatal error: Uncaught Error: Call to undefined function ina_helpers() in …/wp-content/plugins/inactive-logout/src/class-inactive-logout-main.php:266 Stack trace: #0 …/wp-includes/class-wp-hook.php(286): Inactive_Logout_Main->load_scripts(”) #1 …/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #2 …/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 …/wp-includes/script-loader.php(1447): do_action(‘wp_enqueue_scri…’) #4 …/wp-includes/class-wp-hook.php(286): wp_enqueue_scripts(”) #5 …/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #6 …/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #7 …/public in …/wp-content/plugins/inactive-logout/src/class-inactive-logout-main.php on line 266

    ————–

    This message only appears when someone tries to register as an affiliate. It does not appear when a user signs up for our main service, which is done via a MemberPress form.

    I did notice that, even though this fatal error message appears, the affiliate registration is actually successful – the affiliate account does get created correctly. If I refresh the page which shows the error, the affiliate dashboard will appear and everything works as normal.

    Any idea what the problem could be?

    I’m running WordPress 4.9.8 and the latest version of Inactive Logout (v1.9.1).

    I look forward to your reply!

    Kind regards,
    tsg29

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Deepen

    (@j_3rk)

    Hi there,

    Will try to replicate the issue and will fix accordingly. Thanks for the explanation as well – would help me alot.

    Thanks

    chrisgrab

    (@chrisgrab)

    Hi there, I just noticed the same thing happening on a site that I manage. Users were reporting seeing the WordPress “The site is experiencing technical difficulties” message when loading the site – not even when logging into anything. Refreshing the page made the page load up just fine, but looking in the logs has the same errors as in the post above:

    [18-Aug-2019 13:41:54 UTC] PHP Fatal error: Uncaught Error: Call to undefined function ina_helpers() in /var/www/html/wp-content/plugins/inactive-logout/src/class-inactive-logout-main.php:266
    Stack trace:
    #0 /var/www/html/wp-includes/class-wp-hook.php(286): Inactive_Logout_Main->load_scripts(”)
    #1 /var/www/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #2 /var/www/html/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
    #3 /var/www/html/wp-includes/script-loader.php(2537): do_action(‘wp_enqueue_scri…’)
    #4 /var/www/html/wp-includes/class-wp-hook.php(286): wp_enqueue_scripts(”)
    #5 /var/www/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #6 /var/www/html/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
    #7 /var/www/html/wp-includes/general-template.php(2745): do_action(‘wp_head’)
    #8 /var/www/html/wp-content/themes/x/framework/legacy/cranium/headers/views/global/_header.php(16): wp_head()
    #9 /var/www/html/wp-content/themes/x/framework/functions/frontend/view-routing.php(182): include(‘/ in /var/www/html/wp-content/plugins/inactive-logout/src/class-inactive-logout-main.php on line 266

    We are using the X theme on WordPress 5.2.2 with version 1.9.1 of Inactive Logout.
    We are running PHP version 7.2.21 if that is helpful.

    Please let me know if there’s a fix, thank you for your help!

    yes … I am getting this error too … here is the stack trace;

    <b>Fatal error</b>:  Uncaught Error: Call to undefined function ina_helpers() in \wp-content\plugins\inactive-logout\src\class-inactive-logout-main.php:266
    Stack trace:
    #0 \wp-includes\class-wp-hook.php(286): Inactive_Logout_Main->load_scripts('')
    #1 \wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #2 \wp-includes\plugin.php(453): WP_Hook->do_action(Array)
    #3 \wp-includes\script-loader.php(1447): do_action('wp_enqueue_scri...')
    #4 \wp-includes\class-wp-hook.php(286): wp_enqueue_scripts('')
    #5 \wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #6 \wp-includes\plugin.php(453): WP_Hook->do_action(Array)
    #7 \wp-includes\general-template.php(2614): do_action('wp_head')
    #8 \wp-content\themes\Theme-child\header.php(26): wp_head()
    #9 \wp-includes\template.php(688): require_once( in <b>\wp-content\plugins\inactive-logout\src\class-inactive-logout-main.php</b> on line <b>266</b>

    not sure what is needed to fix it … but the problems stems from a failure to load the helper class here:

    FILE: /src/class-inactive-logout-main.php
    
    176:	if ( is_user_logged_in() ) {
    177:		$this->ina_load_dependencies();
    178:		$this->ina_define_them_constants();
    179:	}
    

    if you bypass the logged_in check and unconditionally load the dependencies (including the helper class), the Fatal Error doesn’t occur …

    though I have no clue what the collateral effects would be to loading those files without a valid login_in check … the developer would need to trace that.

    -DJ

    • This reply was modified 2 weeks, 2 days ago by  damelco.
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.