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

User fields aren't saving in 2.0.9 #417

Closed
achavez opened this issue Aug 5, 2015 · 3 comments
Closed

User fields aren't saving in 2.0.9 #417

achavez opened this issue Aug 5, 2015 · 3 comments

Comments

@achavez
Copy link

achavez commented Aug 5, 2015

Custom metabox fields on user object types have stopped saving in v2.0.9. Best I can tell, it's because of the introduction of can_save() in CMB2_hookup.php without the object type being passed.

It works for me after changing to:

if ( $this->can_save( 'user' ) ) {
    $this->cmb->save_fields( $user_id, 'user', $_POST );
}

Happy to send a PR if you agree with the solution and that'd be of help. For now, rolling back to v2.0.8 fixes this in my case.

@achavez achavez changed the title User fields aren't saving User fields aren't saving in 2.0.9 Aug 5, 2015
@jtsternberg
Copy link
Member

This is a pretty big bug, so I'm not waiting for a PR, but will give you props. I'll need to release the next version asap to address it. Thank you for reporting.

@achavez
Copy link
Author

achavez commented Aug 5, 2015

No problem! Thanks for the quick response and for pushing a commit so quickly.

@jtsternberg
Copy link
Member

pluginmirror-worker pushed a commit to wp-plugins/cmb2 that referenced this issue Aug 5, 2015
##### Bug Fixes

* Fix user fields not saving. Props [achavez](https://github.com/achavez), ([#417](CMB2/CMB2#417)).


git-svn-id: https://plugins.svn.wordpress.org/cmb2/trunk@1213577 b8457f37-d9ea-0310-8a92-e5e31aec5664
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants