Notifications
Clear all

[Solved] Critical error in wpforo (functions.php) when registering a new user on the site using the ProfilePress plugin

2 Posts
2 Users
1 Reactions
455 Views
Posts: 1
Topic starter
(@dimau)
New Member
Joined: 1 year ago

Please tell me possible reasons - critical error in wpforo (functions.php) when registering a new user on the site using the ProfilePress plugin.
Log below.

When I disable the forum plugin wpforo (ver 2.2.4) - everything is fine
and 
When I commented out the line in /wpforo/includes/functions.php(2374) everything was fine
/* WPF()->cache->clean( $id, $template, $item ); */

PHP Fatal error: Uncaught Error: Typed property wpforo\classes\Cache::$dir must not be accessed before initialization in /XXX/wp-content/plugins/wpforo/classes/Cache.php:346
Stack trace:
#0 /XXX/wp-content/plugins/wpforo/includes/functions.php(2374): wpforo\classes\Cache->clean(26, 'avatar', Array)
#1 /XXX/wp-content/plugins/wpforo/classes/Members.php(1817): wpforo_clean_cache('avatar', 26)
#2 /XXX/wp-content/plugins/wpforo/classes/Members.php(3265): wpforo\classes\Members->reset(26)
#3 /XXX/wp-content/plugins/wpforo/includes/hooks.php(2071): wpforo\classes\Members->set_groupid(26, 3)
#4 /XXX/wp-content/plugins/wpforo/includes/hooks.php(2211): wpforo_synch_user_roles(26)
#5 /XXX/wp-includes/class-wp-hook.php(324): wpforo_update_usergroup_on_role_change(26, 'subscriber')
#6 /XXX/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#7 /XXX/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#8 /XXX/wp-includes/class-wp-user.php(637): do_action('add_user_role', 26, 'subscriber')
#9 /XXX/wp-includes/user.php(2453): WP_User->set_role('subscriber')
#10 /XXX/wp-content/plugins/wp-user-avatar/src/Classes/RegistrationAuth.php(322): wp_insert_user(Array)
#11 /XXX/wp-content/plugins/wp-user-avatar/src/ShortcodeParser/FormProcessor.php(171): ProfilePress\Core\Classes\RegistrationAuth::register_new_user(Array, 1, '', false, '')
#12 /XXX/wp-includes/class-wp-hook.php(324): ProfilePress\Core\ShortcodeParser\FormProcessor->process_registration_form(Object(WP))
#13 /XXX/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#14 /XXX/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
#15 /XXX/wp-includes/class-wp.php(830): do_action_ref_array('wp', Array)
#16 /XXX/wp-includes/functions.php(1336): WP->main('')
#17 /XXX/wp-blog-header.php(16): wp()
#18 /XXX/index.php(17): require('/home/u34646/mu...')
#19 {main}
thrown in /XXX/wp-content/plugins/wpforo/classes/Cache.php on line 346

1 Reply
BlackRaz
Posts: 404
Admin
(@blackraz)
Contributor
Joined: 8 years ago

Hi @dimau,

This issue has already been fixed in the latest version. The current version of wpForo is 2.2.9. Please update, and all issues related to this will be resolved.