Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UM 2.5.2 and Fatal Error when updating from very old versions of UM #1110

Closed
MissVeronica opened this issue Dec 15, 2022 · 2 comments · Fixed by #1109
Closed

UM 2.5.2 and Fatal Error when updating from very old versions of UM #1110

MissVeronica opened this issue Dec 15, 2022 · 2 comments · Fixed by #1109
Assignees
Labels
bug issue-type: small The "issue-type" labels are used internally. This label means small changes in code. v2.0

Comments

@MissVeronica
Copy link

MissVeronica commented Dec 15, 2022

Describe the bug
UM is calling current_user_can('manage_options') and WP function pluggable is not loaded yet when wp_get_current_user is called. This happens when upgrading from UM 2.3.1 with the DB update job starting.

Stack trace:
#0 /nas/content/live/sibcr1/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-upgrade.php(70): current_user_can('manage_options')
#1 /nas/content/live/sibcr1/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-upgrade.php(53): um\admin\core\Admin_Upgrade->__construct()
#2 /nas/content/live/sibcr1/wp-content/plugins/ultimate-member/includes/class-init.php(810): um\admin\core\Admin_Upgrade::instance()
#3 /nas/content/live/sibcr1/wp-content/plugins/ultimate-member/includes/class-init.php(551): UM->admin_upgrade()
#4 /nas/content/live/sibcr1/wp-content/plugins/ultimate-member/includes/class-init.php(204): UM->includes()
#5 /nas/content/live/sibcr1/wp-content/plugins/ultimate-member/includes/class-init.php(88): UM->_um_construct()
#6 /nas/content/live/sibcr1/wp-content/plugins/ultimate-member/includes/class-init.php(1526): UM::instance()
#7 /nas/ in /nas/content/live/sibcr1/wp-includes/capabilities.php on line 873
[15-Dec-2022 22:12:58 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function wp_get_current_user() in /nas/content/live/sibcr1/wp-includes/capabilities.php:873

UM Support Forum
https://wordpress.org/support/topic/latest-update-2-5-2-fatal-error/

@MissVeronica
Copy link
Author

@MissVeronica MissVeronica changed the title UM 2.5.2 and Fatal Error UM 2.5.2 and Fatal Error when updating from very old versions of UM Dec 16, 2022
@MissVeronica
Copy link
Author

Quick fix for this issue if you are updating from a very old UM version like 2.3 or 2.4 or older.

  1. Download and update to UM 2.5.1 https://github.com/ultimatemember/ultimatemember/releases/tag/2.5.1
  2. Update from UM 2.5.1 to UM 2.5.2

nikitasinelnikov added a commit that referenced this issue Dec 16, 2022
@nikitasinelnikov nikitasinelnikov self-assigned this Dec 16, 2022
@nikitasinelnikov nikitasinelnikov added bug v2.0 issue-type: small The "issue-type" labels are used internally. This label means small changes in code. labels Dec 16, 2022
@nikitasinelnikov nikitasinelnikov linked a pull request Dec 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue-type: small The "issue-type" labels are used internally. This label means small changes in code. v2.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants