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

Custom fields not available as repeatable #969

Merged

Conversation

@desrosj
Copy link
Contributor

commented May 8, 2017

In v2.2.4, a bug was introduced where custom fields were not available as a repeatable field. This was only happening to fields that were added using the cmb2_render_{$field_type} action hook. Fields rendered by a class extending CMB2_Type_Base class were unaffected by this.

Currently, the maybe_custom_field_object always returns the $type property. This is causing the __call() function to never reach the cmb2_render_{$field_type} action hook.

This pull fixes #901, and improves the PHPDocblock for the function.

Fixes bug where all custom field types were assumed to have a class t…
…hat extends `CMB2_Type_Base`. This was causing custom fields available through the `cmb2_render_{$field_type}` action hook to not be repeatable.
@jtsternberg

This comment has been minimized.

Copy link
Member

commented May 8, 2017

This looks like a possible fix, but I will need to test for side-effects. Are you familiar with unit tests? It would be good to write a unit test that verifies this functionality is broken until this patch is applied.

@desrosj

This comment has been minimized.

Copy link
Contributor Author

commented May 8, 2017

I am. I will try to write some this week. Good suggestion. 👍

@RubenMartins

This comment has been minimized.

Copy link
Contributor

commented Jun 19, 2017

Any updates on this?

@jtsternberg jtsternberg merged commit 18c47b1 into CMB2:trunk Jul 7, 2017

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
Scrutinizer No new issues
Details
jtsternberg added a commit that referenced this pull request Jul 7, 2017
@jtsternberg

This comment has been minimized.

Copy link
Member

commented Jul 7, 2017

Thanks for this @desrosj.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.