?
avatar beni71
beni71
4 Dec 2016

I noticed two mistakes:

  1. The Select modal view of the type "checkboxes" shows near to the top right corner a green (-). But when you click on this, then a new selector is adding. In my opinion this must better be a green plus (+):
    checkboxes-minus

  2. On a field type "checkboxes", when you have a value = 0, then this checkbox can never be choosen. See the following steps to reproduce this bug:

Steps to reproduce the issue

  1. Install joomla from staging fresh, with some example articles (on the installer, have choosen the last option).
  2. Login as administrator (on the back end)
  3. Navigate to Content > Fields
  4. Click New.
  5. Choose type "checkboxes"
  6. Set the title to (for example): Hardness
  7. Click on select (last field) and add the following three selectors (or options):
    Text, Value
    Easy, 0
    Medium, 1
    Powerful,2
  8. Save the created selectors and save the field.
  9. Opens an article and navigate to the tab fields
  10. You can see now three checkboxes.
  11. Click/set/check into the first checkbox.
  12. Save the article.

Expected result

The checkbox should be set.

Actual result

The checkbox is always empty/unset.

System information (as much as possible)

Source code synchronized from staging branch
OS Windows
PHP 7.0.13
MySQLi 5.5.5-10.1.19-MariaDB

Additional comments

From my point of view, the value "0" may be the problem. The other checkboxes in the described example work correctly.

avatar beni71 beni71 - open - 4 Dec 2016
avatar joomla-cms-bot joomla-cms-bot - change - 4 Dec 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Dec 2016
avatar beni71 beni71 - change - 4 Dec 2016
Title
[com_fields] type "checkboxes" wrong behavoir with value "0"
[com_fields] type "checkboxes" wrong behavior with value "0"
Labels Removed: ?
avatar beni71 beni71 - edited - 4 Dec 2016
avatar beni71 beni71 - change - 4 Dec 2016
Title
[com_fields] type "checkboxes" wrong behavoir with value "0"
[com_fields] type "checkboxes" wrong behavior with value "0"
avatar ggppdk
ggppdk - comment - 4 Dec 2016

Same thing for radio and and list fields
for checkboxes it happens when you select only 1 value (the value with zero), it should save, if you select more than 1

There is already a PR: #12807
Go ahead and test it

avatar beni71
beni71 - comment - 4 Dec 2016

Uh, first sorry, i forgot to search in the pull request list... but...

@ggppdk: I have now tested both "mistakes" based on the code of PR #12807. You are right, the behavior is exactly as you described. And you already has commented this. Thank you for your help. The other thing with the green minus (-) still exists.

avatar Bakual Bakual - close - 4 Dec 2016
avatar Bakual
Bakual - comment - 4 Dec 2016

See #12886 for the fix for this issue here.

avatar Bakual Bakual - change - 4 Dec 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-12-04 12:05:56
Closed_By Bakual
avatar Bakual Bakual - close - 4 Dec 2016
avatar laoneo
laoneo - comment - 5 Dec 2016

@beni71 can you please test if the fix in #12886 is solving the issue. If yes, then please set it as test success. Thanks.

Add a Comment

Login with GitHub to post a comment