Closed (fixed)
Project:
Pageroute
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2009 at 17:37 UTC
Updated:
25 Apr 2009 at 19:23 UTC
I was getting the following error in the site configuration by module page:
'warning: call_user_func(pageroute_page_view_help::help) [function.call-user-func]: First argument is expected to be a valid callback in' ... '/sites/all/modules/pageroute/pageroute_ui.module on line 326'.
Had a look at the line, and it appears that the class name might be built wrong with ' _help' appended in error, as couldn't find class names with this suffix.
Original (lines 322-328 in pageroute_ui.module):
foreach ($module_types as $module => $types) {
foreach ($types as $type => $typeinfo) {
$output .= '<h3>'. $typeinfo['name'] .'</h3>';
$class = $module .'_page_'. $type.'_help';
$output .= '<p>'. call_user_func(array($class, 'help')) .'</p>';
}
}
Modified to remove the '_help' suffix on line 325:
foreach ($module_types as $module => $types) {
foreach ($types as $type => $typeinfo) {
$output .= '<h3>'. $typeinfo['name'] .'</h3>';
$class = $module .'_page_'. $type;
$output .= '<p>'. call_user_func(array($class, 'help')) .'</p>';
}
}
With this adjustment the help page displays normally and no errors are thrown in the configure page. Hope this helps!
Comments
Comment #1
Tauran commentedThank you!
I commited the changes.
Comment #3
samkat12 commentedThanks. I love drupal. you get a problem and imedately find a solution. I love drupal.