#5511 closed defect (bug) (fixed)
xprofile wp-admin shows duplicate fields for pre-2.0 custom field types
Reported by: | DJPaul | Owned by: | DJPaul |
---|---|---|---|
Milestone: | 2.0 | Priority: | normal |
Severity: | normal | Version: | 2.0 |
Component: | Extended Profile | Keywords: | needs-testing has-patch |
Cc: |
Description
The https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/ plugin implements several custom field types. As it was written before 2.0, it's a good test that the xprofile field type re-implementation hasn't caused any regressions or breaks in backwards compatibility.
I've been in touch with the author of that plugin via email (hi Miguel!) who is testing trunk, and there's an issue in the display of the custom field types in the wp-admin profile fields management screen. The custom field types (not registered into BP in the new 2.0 style) show the custom template, along with the default textbox. Screenshot: http://cl.ly/image/3W3R2O3e3a1N -- the unwanted textboxes are on the left, and the custom field type's template on the right.
It's showing the default textbox because that's what the field type class defaults to if you tell it to create a field type that it doesn't know about.
This regression's been introduced because it looks like I mis-read a switch
statement in the xprofile_admin_field()
function; it looks like a relatively simple fix. I've attached a patch here which works for me, and I'm going to ask Miguel to get it before I commit it.
I am going to commit this in for beta 2 even though I haven't confirmation from the reporter that the bug's fixed (it works correctly in my testing).