Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9831

Cannot change default of Boolean checkbox custom profile field

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.7-PL1
    • Fix Version/s: 3.0.11-RC1
    • Component/s: None
    • Labels:
      None

      Description

      If one creates a Boolean CPF of the checkbox type and selects a default value of either checked or unchecked, the value of 1 or 0, respectively, are entered in the field_default_value field of the profile_fields table. If you subsequently edit the default value from checked to unchecked, or from unchecked to checked, the value in the field_default_value field does not change and hence the edit is not effective.

        Issue Links

          Activity

          Hide
          rxu Ruslan Uzdenov added a comment -

          Yes, the 1st issue is correct. Heh, CPFs are real mess, need to adjust the patch again.
          As for the 2nd issue - yes, personally I believe it's not a problem, but feel free to file a new ticket if you want

          Show
          rxu Ruslan Uzdenov added a comment - Yes, the 1st issue is correct. Heh, CPFs are real mess, need to adjust the patch again. As for the 2nd issue - yes, personally I believe it's not a problem, but feel free to file a new ticket if you want
          Hide
          rxu Ruslan Uzdenov added a comment -

          Tested the patch locally and it seems to be working for me. It also implements the above Oleg's suggestion about field types switch logic:

          2. Set profile field type to radio button and make the second option default by clicking it. Now change profile field type to checkbox. The checkbox for whether the profile field is checked or not is checked. This is the same behavior as if the first radio button was chosen. I would expect that choosing the second radio button as default and then changing field type to checkbox would produce an unchecked checkbox for default value.

          Everybody who is interested in it, please test it thoroughly.

          Show
          rxu Ruslan Uzdenov added a comment - Tested the patch locally and it seems to be working for me. It also implements the above Oleg's suggestion about field types switch logic: 2. Set profile field type to radio button and make the second option default by clicking it. Now change profile field type to checkbox. The checkbox for whether the profile field is checked or not is checked. This is the same behavior as if the first radio button was chosen. I would expect that choosing the second radio button as default and then changing field type to checkbox would produce an unchecked checkbox for default value. Everybody who is interested in it, please test it thoroughly.
          Hide
          stevemaury stevemaury added a comment -

          I replaced the standard files with those two patched files. If the default is initially set to Checked (value 1) then you cannot change it, as in the original bug. But if it is set to Unchecked initially, (value 0) you CAN change it.

          Show
          stevemaury stevemaury added a comment - I replaced the standard files with those two patched files. If the default is initially set to Checked (value 1) then you cannot change it, as in the original bug. But if it is set to Unchecked initially, (value 0) you CAN change it.
          Hide
          stevemaury stevemaury added a comment -

          Received revised includes/acp/acp_profile.php this AM and bug appears to now be fixed.

          Show
          stevemaury stevemaury added a comment - Received revised includes/acp/acp_profile.php this AM and bug appears to now be fixed.
          Hide
          rxu Ruslan Uzdenov added a comment -

          Thank you for testing, Steve.
          The patch has been updated accordingly.

          Show
          rxu Ruslan Uzdenov added a comment - Thank you for testing, Steve. The patch has been updated accordingly.

            People

            • Assignee:
              rxu Ruslan Uzdenov
              Reporter:
              stevemaury stevemaury
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development