Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi,
I am using the cck 6.x-3.0-alpha3+13-dev module and I am using the content multi-group module to get field of tables in the node edit form and node view. I noticed that on node view the fields that are supposed to be hidden by permissions for particular users are able to see the headers but not the data. I was able to fix it in the fix content_multigroup.node_view.inc. Here is the patch:
--- a/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_view.inc
+++ b/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_view.inc
@@ -25,7 +25,7 @@ function _content_multigroup_fieldgroup_view(&$node, &$element, $group, $context
$group_fields = array();
foreach ($content_type['fields'] as $field_name => $field) {
if (isset($group['fields'][$field_name]) && isset($element[$field_name])) {
- if (!isset($element[$field_name]['#access']) || $element[$field_name]['#access']) {
+ if (!isset($element[$field_name]['field']['#access']) || $element[$field_name]['field']['#access']) {
$group_fields[$field_name] = $field;
}
}
You can see from the code that access test was checking the wrong value. The access value is in $element[$field_name]['field']['#access']
.
Comment | File | Size | Author |
---|---|---|---|
#2 | cck.module_6.x-3.0-alpha3+13-dev_table_multiple_cols_show_hidden_headers-1651244-2.patch | 709 bytes | dmundra |
Comments
Comment #1
dmundraUpdating the status to needs review.
Comment #2
dmundraAttaching patch file.
Comment #2.0
dmundraFixed typos
Comment #3
dmundraStill an issue with 6.x-3.0-alpha4. Updated the version of this issue.