Hi,
I am not sure whether this is a ctools bug or a features module bug, but i am going to post here first of all since the error message itself is being generated from ctools.
I am using features in conjunction with ctools to export panel pages (+ other stuff) to code. I am not using the built in ability of features to export a panel, since i dont believe it is functionally complete and working yet (issues here - http://drupal.org/node/532256).
I am using features version 6.x-1.0-beta-4.
I am instead using the default method of running a panel page from code.
In my module file i have the following -
/**
* Implementation of hook_ctools_plugin_api().
*/
function mymodule_ctools_plugin_api($module, $api) {
if ($module == 'page_manager' && $api == 'pages_default') {
$module_path = drupal_get_path('module', 'defaqto_guides');
return array('version' => 1, 'path' => $module_path);
}
}
And in my modules folder i have a corresponding mymodule.pages_default.inc file with the following -
function mymoulde_default_page_manager_handlers() {
$handlers = array();
//handler export code here...
$handlers[$handler->name] = $handler;
return $handlers;
}
When i disable and then re-enable one of my features i get the following error -
warning: Missing argument 1 for mymodule_ctools_plugin_api() in mymodule.module on line 16.
The panels actually still all work okay, but this bug keeps on coming up every time i re-enable each feature.
Comments
Comment #1
merlinofchaos commentedHmm. Does the error message tell you what line the call is coming from? That's where the error is, not where the function was defined. It'll be hard to figure this out without that information.
In the worst case, you can probably figure out where this is being called from using dsm() and debug_backtrace() (assuming you're using devel.module)
Comment #2
tayzlor commentedhi merlin,
pasting debug_backtrace() code below if it is of any help to you (starting from calling the feature enable function)
Comment #3
merlinofchaos commentedThat clearly has arguments in the call, so it can't be the problem. You might want to wrap your debug in a check to test if the first argument is NULL.
Comment #4
tayzlor commentedHello,
wrapping the debug in an if statement to check if $module is set, the debug_backtrace() never gets called but the error still comes up on the screen. weirdness.
Comment #5
merlinofchaos commentedWell, I'm at a bit of a loss to explain this. :/
Comment #6
esmerel commentedUnable to replicate. I hate stuff like this - maybe someone in features has an idea?