Skip to:
Content

BuddyPress.org

#9035 closed defect (bug) (fixed)

[BP 12] On the profile "add new field" screen, the default field type "checkbox" is not initially showing the subsequent options

Reported by: strategio's profile strategio Owned by: imath's profile imath
Milestone: 12.1.0 Priority: normal
Severity: normal Version: 12.0.0
Component: Extended Profile Keywords: has-patch
Cc:

Description

=> https://www.awesomescreenshot.com/image/44825622?key=af95aa058c6ce32399b495f43917e1c7

We need to change the type to another one (e.g. "radio") and switch back to "checkbox" in order to see the options.

=> https://www.awesomescreenshot.com/image/44825660?key=ac611cf84fe3cecb09d20887a062626a

Change History (7)

#1 @imath
10 months ago

  • Keywords needs-patch added

I confirm, this is annoying. The default type should be the text input one.

Thanks a lot for your report @strategio

#2 @imath
10 months ago

It's a regression introduced by [13414]

This ticket was mentioned in PR #200 on buddypress/buddypress by @imath.


10 months ago
#3

  • Keywords has-patch added; needs-patch removed

In r13414 the BP_XProfile_Field::$type variable default value was set to '' to prevent deprecation notices. This move generated a side effect on the selected default field of the select box used to define a new xProfile field type. The is_null() check performed inside bp_xprofile_admin_form_field_types() needs to be replaced by a check for an empty string.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/9035

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


10 months ago

#5 @imath
10 months ago

In 13668:

xProfile Admin: use textbox as the default selected field type

In [13414] the BP_XProfile_Field::$type variable default value was set to '' to prevent PHP deprecation notices. This move generated a side effect on the selected default field of the select box used to define a new xProfile field type.

Instead of having the textbox field type selected by default, the checkbox was used. The downside of this is: this field type, unlike the textbox one, needs a meta box to define option values which was not displayed. This meta box is only displayed using JavaScript when the selected value of the Field type select box has changed.

Props strategio

See #9035 (trunk)
Closes https://github.com/buddypress/buddypress/pull/200

#6 @imath
10 months ago

  • Component changed from Core to Extended Profile

#7 @imath
10 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 13669:

xProfile Admin: use textbox as the default selected field type

In [13414] the BP_XProfile_Field::$type variable default value was set to '' to prevent PHP deprecation notices. This move generated a side effect on the selected default field of the select box used to define a new xProfile field type.

Instead of having the textbox field type selected by default, the checkbox was used. The downside of this is: this field type, unlike the textbox one, needs a meta box to define option values which was not displayed. This meta box is only displayed using JavaScript when the selected value of the Field type select box has changed.

Props strategio

Fixes #9035 (branch 12.0)

Note: See TracTickets for help on using tickets.