Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
Hello,
If I enable Signup restrictions, I get an error when I try to edit the Signup at Content types:
Fatal error: Call to undefined function _content_type_info() at
sites/all/modules/cck_signup/cck_signup_restrictions/cck_signup_restrictions.admin.inc on line 32
The error is not there when I disable the Signup restrictions.
So, I can't add restrictions now :(
Comments
Comment #1
hopewise CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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: