Skip to content
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

com_fields: Default value for checkbox not properly working #31329

Open
c-schmitz opened this issue Nov 6, 2020 · 2 comments
Open

com_fields: Default value for checkbox not properly working #31329

c-schmitz opened this issue Nov 6, 2020 · 2 comments

Comments

@c-schmitz
Copy link

c-schmitz commented Nov 6, 2020

Steps to reproduce the issue

Go to com_fields, create a checkboxes field with one field
Set the default value to the same value as the field.
In the administration edit any user.
See that the checkbox is pre-selected as expected.
Now uncheck the checkbox and save.

Expected result

After saving the checkbox should not be marked, anymore.

Actual result

The checkbox is marked again after saving.

System information (as much as possible)

Database Type | mysql
Database Version | 5.5.5-10.1.47-MariaDB-0ubuntu0.18.04.1
Database Collation | utf8mb4_general_ci
Database Connection Collation | utf8mb4_general_ci
PHP Version | 7.2.24-0ubuntu0.18.04.7
Web Server | nginx/1.14.0
WebServer to PHP Interface | fpm-fcgi
Joomla! Version | Joomla! 3.9.21 Stable [ Amani ] 25-August-2020 15:00 GMT
Joomla! Platform Version | Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0

Additional comments

It seems that when unchecking and saving the box the value from the table fields_values is removed while it should save as an empty value.
Because the value is removed the default value kicks in again once the field values are loaded and it is determined that there is no value saved.

@brianteeman
Copy link
Contributor

confirmed with one field only

@Quy
Copy link
Contributor

Quy commented Feb 2, 2021

Related #29645

@Hackwar Hackwar added the bug label Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants