Skip to content

Conversation

@desrosj
Copy link
Contributor

@desrosj desrosj 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.

…hat extends `CMB2_Type_Base`. This was causing custom fields available through the `cmb2_render_{$field_type}` action hook to not be repeatable.
@jtsternberg
Copy link
Member

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
Copy link
Contributor Author

desrosj commented May 8, 2017

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

@RubenMartins
Copy link
Contributor

Any updates on this?

@jtsternberg jtsternberg merged commit 18c47b1 into CMB2:trunk Jul 7, 2017
jtsternberg added a commit that referenced this pull request Jul 7, 2017
@jtsternberg
Copy link
Member

Thanks for this @desrosj.

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

Successfully merging this pull request may close these issues.

3 participants