Any idea why Features would be generating this:
/**
* Implements hook_views_api().
*/
function ia_misc_views_api() {
list($module, $api) = func_get_args();
if ($module == "views" && $api == "views_default") {
return array("version" => "3.0");
}
}
when it should be generating this:
/**
* Implementation of hook_views_api().
*/
function ia_misc_views_api() {
return array(
'api' => 3,
'path' => drupal_get_path('module', 'ia_misc') . '/includes',
);
}
I'm running -dev of views 3, ctools and features under D7.
Comments
Comment #1
ezra-g commented#1459120: Possible Views schema bug causes Features exports to fail has some more information about this from merlinofchaos. I believe this is actually a bug.
Comment #2
ezra-g commentedThe attached patch changes the way ctools_features_export_render() operates when defining hook_views_api().
Note, I first tried defining a separate features.views.inc, but that seems to be insufficient since ctools_features_export() will still run in general and call _ctools_features_get_info(), which reads from the {views_view} schema. It would appear as though we need to add an exception in one place or the other.
I tested this approach with drush fu on a feature that includes default views and a style plugin and both are re-exported correctly.
Comment #3
polI think what you wrote is totally correct, however I have a few minor complaints:
I would do:
$code[] = ' return array("version" => "3.0");'Remove empty spaces at the end of the line.
Remove empty tab.
Comment #4
ezra-g commentedThanks for the prompt review!
I moved
to address your first point and fixed the spacing issues - Thanks for catching those. Just updated my editor and overwrote my default settings :P.
Thanks!
Comment #5
polFor me it's good now :-)
Comment #6
tim.plunkettCross posting from #1480824: Unable to provide CTools plugins from a features module that provides a default view
If a feature has an exported panel page variant, it can no longer provide any other CTools plugin, like content_type. I think this whole thing should be gutted, not just Views.
Comment #7
mpotter commentedTim's version looks the best for me and seems to work.
Comment #8
mpotter commentedCommitted ef2f805
Comment #10
mpotter commentedHere is the actual commit that was used instead for rc2: c6a1408
The commit in #8 broke features with views. It was reverted and this new patch was committed to rc2. Sorry for not posting this as a proper patch for people who wanted to use drush.make with it on rc1. But now you can just use rc2.
Comment #10.0
mpotter commentedforgot <?php.