I simply installed the module, added a role reference to my Custom Content. Went to edit an existing node and got an error:
PHP Fatal error: Call to undefined function log_debug() in /var/www/{site}/sites/all/modules/rolereference/rolereference.module on line 933, referer: http://{site}/node/16670
Stack trace:
- {main}() /var/www/{site}/index.php:0, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- menu_execute_active_handler() /var/www/{site}/index.php:17, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- call_user_func_array() /var/www/{site}/includes/menu.inc:350, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- node_page_view() /var/www/{site}/includes/menu.inc:350, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- node_show() /var/www/{site}/modules/node/node.module:1810, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- node_view() /var/www/{site}/modules/node/node.module:1114, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- node_invoke_nodeapi() /var/www/{site}/modules/node/node.module:1039, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- custom_breadcrumbs_nodeapi() /var/www/{site}/modules/node/node.module:685, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- token_replace() /var/www/{site}/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs.module:64, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- token_replace_multiple() /var/www/{site}/sites/all/modules/token/token.module:215, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- token_replace_multiple() /var/www/{site}/sites/all/modules/token/token.module:257, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- token_get_values() /var/www/{site}/sites/all/modules/token/token.module:277, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- module_invoke_all() /var/www/{site}/sites/all/modules/token/token.module:367, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- call_user_func_array() /var/www/{site}/includes/module.inc:497, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- content_token_values() /var/www/{site}/includes/module.inc:497, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
- rolereference_token_values() /var/www/{site}/sites/all/modules/cck/includes/content.token.inc:46, referer: http://{site}.lo/documents/governance-documents/2010-conflict-interest-confidentiality-foms
Fixed by commenting the log_debug() line as follows:
/*
* CCK field Token API hook_token_value implimentation
* @see content.token.inc @ http://drupal.org/node/156860
*
* @param String type Type of value to process
* @param Array object Field values
* @param Array options Options array
* @return Array An array of token-name => String value
*/
function rolereference_token_values($type, $object = NULL, $options = array()) {
if ($type == 'field') {
$item = $object[0];
$tokens['rid'] = $item['rid'];
$tokens['role'] = $item['view'];
$all = array();
foreach ( $object as $item ) {
$all['rid-all'][] = $item['rid'];
$all['role-all'][] = $item['view'];
}
foreach ( $all as $key => $values ) {
$tokens[$key] = theme('rolereference_tokens_all', $values, $key);
}
// log_debug('tokens=' .print_r($tokens, true));
return $tokens;
}
}
Comments
Comment #1
t1gor commentedAdded a possible solution. I suppose some module is missing in my installation ..
Comment #2
t1gor commentedFormatting fix in comment/solution
Comment #3
t1gor commentedComment #4
jeffamHere's a patch, should anyone need it.
Comment #6
alex liannoy commented