Needs work
Project:
CCK Signup
Version:
7.x-1.0-alpha5
Component:
CCK Signup core
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2011 at 12:03 UTC
Updated:
9 Nov 2015 at 17:29 UTC
Jump to comment: Most recent
Comments
Comment #1
hopewise commentedHello,
I think have fixed this bug, but, I am not sure, as I am very new to Drupal
I have changed the function _cck_signup_restrictions_text_fields at
cck_signup_restrictions.admin.inc to work with D7 like this:
function _cck_signup_restrictions_text_fields($type) {
$options = array();
foreach (field_info_instances('node', $type) as $instance) {
$field = field_info_field_by_id($instance['field_id']);
if (in_array($field['type'], array('text'))) {
$options[$field['field_name']] = $field['widget']['label'];
}
}
return $options;
}
The previous bugged version:
/**
* Get text fields associated with node $type.
*/
function _cck_signup_restrictions_text_fields($type) {
$options = array();
$info = _content_type_info();
$fields = $info['content types'][$type]['fields'];
foreach ($fields as $field) {
if (in_array($field['type'], array('text'))) {
$options[$field['field_name']] = $field['widget']['label'];
}
}
return $options;
}
But, I still can't use the restrictions at Signup module, can some one please point me to a documentation for the restrictions ? I couldn't find it ..
Thanks
Comment #2
jhedstromThe signup restriction module hadn't been updated to 7.x when the current release was bundled. It will be part of the next release (or you can grab the version out of CVS).
Comment #3
jhedstromAlpha3 contains this fix.
Comment #5
zabelc commentedFYI I also discovered _content_type_info in cck_signup_group_confirmation_form_node_type_form_submit in 7.x-1.0-alpha5.
Comment #6
r_h-l commentedThere is a simple fix for this issue. Granted it appears that this project is abandoned, but the following code should work: