-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
When I change any field in a user profile, I see the following error in a Multisite installation of Newspack 6.0.2:
Fatal error: Uncaught Error: Call to undefined function Newspack\get_user() in /web/dev/phpdev/docs/bkc-blogs/wp-content/plugins/newspack-plugin/includes/plugins/co-authors-plus/class-nicename-change.php:209
Stack trace:
#0 /web/dev/phpdev/docs/bkc-blogs/wp-includes/class-wp-hook.php(326): Newspack\Nicename_Change::profile_update()
#1 /web/dev/phpdev/docs/bkc-blogs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 /web/dev/phpdev/docs/bkc-blogs/wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /web/dev/phpdev/docs/bkc-blogs/wp-includes/user.php(2509): do_action()
#4 /web/dev/phpdev/docs/bkc-blogs/wp-includes/user.php(2632): wp_insert_user()
#5 /web/dev/phpdev/docs/bkc-blogs/wp-admin/includes/user.php(233): wp_update_user()
#6 /web/dev/phpdev/docs/bkc-blogs/wp-admin/user-edit.php(171): edit_user()
#7 /web/dev/phpdev/docs/bkc-blogs/wp-admin/profile.php(18): require_once('...')
#8 {main} thrown in **/web/dev/phpdev/docs/bkc-blogs/wp-content/plugins/newspack-plugin/includes/plugins/co-authors-plus/class-nicename-change.php** on line **209**`
The change is applied correctly but the error appears as a splash screen after submission!
To Reproduce
Steps to reproduce the behavior:
- Install Newspack 6.0.2 on a Multisite installation
- Log in to the dashboard
- Select Users -> Profile
- Change any field on the profile like "Website" or "First Name"
- Press "Update Profile"
- Observe the above error in a splash screen
- Press the browser back button
- Observe that the change was correctly applied
Expected behavior
I expect the profile editing page to reload with the "Profile updated." banner at the top
Notes
I'm not a Wordpress dev but I'm guessing that get_user here might be making some assumptions about how to get a user in a multisite installation?
Metadata
Metadata
Assignees
Labels
No labels