#3191 closed defect (bug) (fixed)
Fatal error: Call to undefined function bbp_new_converter() on first login user after forum conversion
Reported by: | jrf | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.6 | Priority: | high |
Severity: | major | Version: | trunk |
Component: | API - Importers | Keywords: | needs-patch |
Cc: | johnjamesjacoby |
Description
Basics:
- WP Multisite
- WP 4.9.x
- PHP 7.1.x
- bbPress trunk revision 6777
Situation:
- Freshly imported phpBB forum (but I don't think the bug is phpBB specific)
- When an existing (old) forum user tries to login for the first time on the newly converted forum, they are faced with a white screen of death with the below as the underlying error message.
- This is caused by the old password not having been converted yet and should only happen the first time the user tries to login.
`PHP Fatal error: Uncaught Error: Call to undefined function bbp_new_converter() in path/to/wp/wp-content/plugins/bbpress/includes/users/functions.php:981 Stack trace: #0 path/to/wp/wp-includes/class-wp-hook.php(286): bbp_user_maybe_convert_pass('') #1 path/to/wp/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 path/to/wp/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 path/to/wp/wp-content/plugins/bbpress/includes/core/sub-actions.php(256): do_action('bbp_login_form_login') #4 path/to/wp/wp-includes/class-wp-hook.php(286): bbp_login_form_login('') #5 path/to/wp/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #6 path/to/wp/wp-includes\plugin.php(453): WP_Hook->do_action(Array) #7 path/to/wp/wp-login.php(457): do_action('login_form_login') #8 {main} thrown in path/to/wp/wp-content/plugins/bbpress/includes/users/functions on line 981
Trying to fix this with a quick hack - i.e. adding a require_once bbpress()->includes_dir . 'admin/tools/converter.php';
above the problem line - will not work either as for some reason it then *does* trigger the load of the files correctly resulting in a Fatal error: Cannot redeclare bbp_get_converters() (previously declared in ... )
error.
This in turn is, of course, caused by most include/require statements not using include_once/require_once
.
I don't have an in-depth understanding of the logic of the file loading used in bbPress, so no patch included unfortunately, but I can't help but wonder why no autoloading mechanism is in place ?
Any help to get this fixed would be greatly appreciated!
Change History (7)
#2
@
7 years ago
- Milestone changed from Awaiting Review to 2.6
- Owner set to johnjamesjacoby
- Priority changed from normal to high
#4
@
7 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Hi @johnjamesjacoby I really appreciate your work on this.
I've just ran some tests however, and I'm still running into the same error when using bbPress revision 6785.
Any more bright ideas ?
#7
@
7 years ago
@johnjamesjacoby Hiya, thanks for all your help with this and the additional patches.
I've had a chance to test them in the mean time and AFAICS, things are looking good now, so I've passed it on to the end-user testing again.
Fingers crossed that they won't find anymore issues ;-).
Oh and some additional info:
Trying to get round this bug by using a script to just set the WP passwords for all imported users (and mail it to them) will not work either as the
bbp_user_maybe_convert_pass()
function checks the user meta data and disregards existing WP passwords.