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 field Types that are repeatable are not shown properly. #901
Comments
Any update on this? |
No word that I've seen, but I also missed seeing this one. @RubenMartins are you also do your own custom field type like the issue opener is? |
git bisect shows that this commit is what broke the code above in the original posting: 410cee4 |
Based on further testing, the __call() method is hit twice, and houses this line 410cee4#diff-32fc356ab519c81b4a672288be3a1e46R61 For the first hit, @jtsternberg Any light on this one? You're more aware of the change involved than I am. |
@tw2113 yes I created an custom field with cmb2_render_ function witch is repeatable. And prior to the version 2.2.4 this works fine but with this version this bug appeared. |
Any update on this @jtsternberg ? |
Nothing I've personally seen. @jtsternberg Re-pinging you for some possible feedback. |
I am also encountering this. A custom field added in the same manner described ( |
@bnecreative I noticed in the code that you provided, you have three filters. I believe that your I have opened a pull request that fixes the issue as I saw it happening. Any testing is appreciated! |
PR mentioned: #969 |
@desrosj add_filter was used in the initial wiki example of making an address field which is why I used it; regardless, both works. This PR, changing the return to false, does works on my end using trunk. I'm not sure if there is a side effect to that change for other scenarios. |
@bnecreative Gotcha! Was worth double checking. I am somewhat new to CMB2, so some older code examples may not stand out as such to me. Thanks for confirming that the PR fixes the issue for you. I am going to work on some unit tests for the pull request to prove it does what it's supposed to without any ill effects and hopefully we can get this fixed. |
I also encountered this bug. I would appreciate if this would be fixed soon. |
Prior to v2.2.4, a custom field that has more than one field would output normally in a repeatable set. The new custom field is built similarly to the address field that is in the CMB2 code library. It comprises of two fields - 1) text 2) textarea.
Expected Behavior:
Prior to v2.2.4, a custom field that has more than one field would output normally in a repeatable set.
Image: https://www.dropbox.com/s/2qqgssl9w1cwin0/people-before224.png?dl=0
Actual Behavior:
Since v2.2.4, only the second field of the set is added in a repeatable set after clicking the add row button. In addition, the surrounding html markup of the 2 fields are not included in the new row.
Image: https://www.dropbox.com/s/b3ofkh2sninevi2/people224.png?dl=0
Steps to reproduce (I have confirmed I can reproduce this issue on the trunk branch):
CMB2 Field Registration Code:
The text was updated successfully, but these errors were encountered: