No Code Attached Yet bug
avatar c-schmitz
c-schmitz
6 Nov 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.

avatar c-schmitz c-schmitz - open - 6 Nov 2020
avatar joomla-cms-bot joomla-cms-bot - change - 6 Nov 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Nov 2020
avatar c-schmitz c-schmitz - change - 6 Nov 2020
The description was changed
avatar c-schmitz c-schmitz - edited - 6 Nov 2020
avatar brianteeman
brianteeman - comment - 24 Nov 2020

confirmed with one field only

avatar Quy
Quy - comment - 2 Feb 2021

Related #29645

avatar Hackwar Hackwar - change - 20 Feb 2023
Labels Added: No Code Attached Yet bug
Removed: ?
avatar Hackwar Hackwar - labeled - 20 Feb 2023

Add a Comment

Login with GitHub to post a comment