Closed (fixed)
Project:
Taxonomy Access Control Lite
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2014 at 14:33 UTC
Updated:
18 Oct 2017 at 10:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Mirkozzo commentedComment #2
Dave Cohen commentedCan you apply this patch which will print some debug info? I want to know what kind of field you have enabled.
Comment #3
Mirkozzo commentedTnx for debug script.
Debug report:
The problem is module "shs"(Simple hierarchical select),
if i don't use shs's widget there are no errors, but i need it
If i select shs's widget, it display 2 errors per field. In my fist post i used 2 taxonomy field with shs's widget -> 4 error message
Comment #4
Mirkozzo commentedIs it possible to fix?
Comment #5
Mirkozzo commentednews?
Comment #6
Mirkozzo commentednews?
Comment #7
jhedstromSeeing this in D8 still. Also running with SHS, so that module seems to still be altering the form/widget in such a way this module isn't expecting.
Comment #8
jhedstromThis actually wasn't caused by SHS, but was reproducible with just tac_lite.
Comment #9
mroycroft commentedI've reviewed the code changes, patch looks good. I haven't had time to manually test this yet.
Comment #12
mukila commentedUpdated the changes in 8.x-1.3 release
Comment #13
lpsolit commented@mukila: is this the right commit? It has nothing to do with the patch proposed in comment 8. Or was the patch in comment 8 incorrect and you fixed the bug in a different way?
Also, about your commit, this change cannot be right:
- if ($form[$field_name]['widget']['#type'] != 'select' && $form[$field_name]['widget']['#type'] != 'radios') {
- continue;
- }
+ if (isset($form[$field_name]['widget']['#type']) && ($form[$field_name]['widget']['#type'] == 'select' || $form[$field_name]['widget']['#type'] != 'radios' || $form[$field_name]['widget']['#type'] != 'checkboxes')) {
In the initial code, the code stopped ("continue") if the type was neither 'select' nor 'radios'. Said differently, the code was going on if it was either 'select' or 'radios'. In your commit, your code *always* goes on, because "either not radios or not 'checkboxes'" will always evaluate to true. What you want is == instead of !=.
Comment #14
mukila commentedThanks a lot LpSolit for your comments. The patch in comment in 8 is incorrect(After applying the patch it throws Notice: Undefined index: #options in tac_lite_create_form_alter() ), so I tried to fix it in different way(Support only for select box, checkboxes, radios widget). But there is some bug in the commit. You're correct, we need to replace != with ==
Comment #16
lpsolit commentedThanks for the new commit. It now looks good (and is much cleaner). :)
I guess you will release 8.x-1.4 very soon as the release yesterday is bogus?