Closed (fixed)
Project:
Features
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
18 Mar 2011 at 14:36 UTC
Updated:
3 Jun 2011 at 18:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mordonez commentedI'm getting the same issue
Comment #2
dawehnerViews in drupal7 uses ctools export, so the specific views integration could be perhaps dropped.
Comment #3
irakli commentedComment #4
lelizondo commentedI just updated to Views/Ctools new devs versions and I'm getting a WSOD when trying to create a new Feature but I'm not getting this error.
Comment #5
aanjaneyam commentedsubscribe
Comment #6
henrijs.seso commentedsubscribe, same here
Comment #7
irakli commentedUpdate: as expected, simply removing features.views.inc file (which used to implement non-CTools exporting) gets rid of the aforementioned error and Features starts relying on CTools for Views exporting; after which exporting views becomes possible in Features again.
However, enabling exported feature does not create view :( After much testing, I used CTools bulk export to export [the same, test-] view and code is seemingly identical (except for weirdly enough CTools Bulk export indicating API version as 2, while Features exports: 3.0 Will have to look into that), so I don't think Features is messing up much. Tried export/enabling a view with CTools Bulk Export and it did not work, either.
Anybody knows the status of CTools integration in Views? Is it still flaky in dev- or is it just me?
Will try to ping Views maintainers tomorrow if no response here.
Thanks
Comment #8
interx commentedSubscribe.
Comment #9
davidbarbarisi@gmail.com commentedI'm having the same issue. Commenting out the views_include_default_views(); line in features.module fixes it. It just won't export default views then, which is an acceptable workaround in my case.
Comment #10
irakli commented@dbarbar, you should not comment that one line (that will just leave things broken) but remove the entire file.
Comment #11
davidbarbarisi@gmail.com commentedThanks. I can confirm that exporting features using ctools for the view seems to work, but importing a feature in to a new site does not create the view.
Comment #12
MichaelCole commentedsubscribe
Comment #13
zilverdistel commentedThanx!
Removing the file features.views.inc fixed my problem ...
Comment #14
bojanz commentedirakli, what ctools version are you using?
Alpha3 had a bug that caused default views not to show up (#1097702: Export.inc needs to use version_compare()), it's fixed in the latest dev. It might be causing your problem.
Comment #15
aanjaneyam commented@bojanz Well I am using Ctools DEV dated 19 March 2011 and I can only see custom views created by me.
Comment #16
irakli commented@bojanz,
I am using both views and ctools from Git and have been pulling updates, but still looks broken.
Test-case:
1. Create a view
2. Export a view using CTools Bulk Export as a module
3. Delete view
4. Enable exported module
at which point the view should show up, but it does not (even through CTools, without any Features intervention).
Can anybody confirm that you are seeing the same, please?
Thanks
Comment #17
quartsize commentedI am seeing the same thing. EDIT: well, mostly the same thing. I wasn't using bulk export, but it looks like the problem is there, too.
See commits http://drupal.org/commitlog/commit/8124/eca98c081a59916d182cf6904eb88f23... and http://drupal.org/commitlog/commit/8124/ead17933e283764f7ef6308d34d74222....
merlinofchaos added hooks hook_$api_hook_name and hook_ctools_plugin_api_hook_name to CTools, allowing modules to specify a different name for hook_ctools_plugin_api. He also committed changes to Views to take advantage of the new hooks (see views_ctools_plugin_api_hook_name() in views.module).
In short: instead of generating code to implement hook_ctools_plugin_api, Features needs to generate code to implement hook_views_api, or whatever a module has decided to name its hook, for CTools integration to continue working.
Comment #18
quartsize commented[EDIT: scratched]
bulk_export had the same problem Features has. merlinofchaos has now committed a fix for bulk_export, which needs to somehow be incorporated into Features.
Comment #19
quartsize commentedScratch that; it is critical: it completely breaks drush fl, &c. if you don't remove includes/features.views.inc.
So it appears that includes/features.views.inc needs to be removed (or made conditional in some way), and includes/features.ctools.inc needs to be patched to accommodate the changes in CTools.
Comment #20
dasjosame issue here with todays dev versions of ctools, views and features
Comment #21
dasjoafter removing features.views.inc i still can't access my exported views like irakli stated in #7
also when accessing admin/structure/myfeature i receive
Comment #22
fangel commentedsubscribe
Comment #23
scottkrieger commentedsubscribe
Comment #24
bc commentedsubscribing
Comment #25
irakli commentedCommitted: http://drupalcode.org/project/features.git/commit/922fce6
Had to commit to a separate branch though (7.views-post-alpha1-exportable-fix) since this change can not be released until new CTools/Views are released and just in case we need to release Features in the meantime. Will try to talk to CTools/Views guys to find out when that release is coming out so we can merge back.
Meanwhile, here's the diff: http://drupalcode.org/project/features.git/commitdiff/922fce6?hp=6f8cbb1...
Many thanks to whole bunch of people in IRC (including @quartsize and Earl but I apologize if I am forgetting somebody) - your help was instrumental and much appreciated in fixing this issue!
Comment #26
lelizondo commentedI love Git. Something like this would have been impossible to do with CVS. Thanks. :)
Comment #27
quartsize commented@irakli: merlinofchaos seems to have rolled alpha4, so you can probably remove the copy of ctools_plugin_api_get_hook.
Comment #28
irakli commentedMerged the experimental branch back into 7.x-1.x Looks good to me.
Anybody available/willing to do some independent testing on 7.x-1.x, before we make a release?
Thanks
Comment #29
febbraro commentedIn the following code (line 85 of features.ctools.inc)
Don't you mean to say
It looks like you might have assigned 'ctools_plugin_api' to the wrong variable, $api_hook when you meant $plugin_api_hook_name?
Comment #30
quartsize commentedThat line shouldn't even be necessary, since ctools_plugin_api_get_hook (ctools/includes/plugins.inc:175) will not return empty.
Comment #31
irakli commentedNothing gets past eagle-eye @febbraro :) Good catch!
Quartsize is correct, ctools_plugin_api_get_hook has similar check and never returns empty so removing the line.
Committed: http://drupalcode.org/project/features.git/commit/6ff1c7e
thanks
Comment #32
irakli commentedComment #33
molave commentedHi all,
So...
Should I now download and apply the patch from this link from #31?
http://drupalcode.org/project/features.git/commit/6ff1c7e
I found this thread after a enabling Features 7.x-1.0-beta1 on a fresh D7 install and getting WSOD when trying to create a new Feature. The Manage Features page loads, though, without a problem.
Thanks
Comment #34
irakli commented@molave,
if you are using latest Features and CTools, then your best bet is 7.x dev branch, which you can either checkout from Git or download as dev tarball.
Comment #35
molave commentedOk got it---use the dev branch. Thanks irakli! That did not occur to me.
Cheers.
UPDATE:
Hey it worked! Very very cool. Thanks again to everyone.
Comment #36
pontus_nilssonCan confirm that the -dev version did the trick
Comment #37
derEremit commentedwhen I import pre-views beta 3 features, everything is ok,
when I then export them the hook Implementation of hook_views_api(). is missing
without this my views won't get imported again.
views-3.x-beta3
ctools-1.x-alpha4
features-dev from 28 of March
i think the missing hook is inteded as I also get the message that i could remove empty module.features.inc
with the message:
// This file is deprecated and can be removed.
// Please remove include_once('" ".features.inc') in " ".module as well.
Comment #38
SofiaSund commentedHi
After upgrading to features-7.x-1.x-dev, I get the same error messages as dasjo #21 (using the latest stable version of Views (7.x-3.0-beta3) and CTools (7.x-1.0-alpha4). I tried upgrading to the latest Views dev version (7.x-3.x-dev) and to the latest CTools dev version (7.x-1.x-dev), but the error is still there.
Since some of you (molave and pontus_nilsson) seem to have got everything working, am I missing something?
Comment #39
pontus_nilssonCorrection from #36. I am able to export with -dev of features but when reverting the feature all my views in the feature are bye bye.
Comment #40
molave commentedThanks for the update pontus_nilsson.
Hi SofiaSund. I'd like to expand on #35: after the WSOD scare, I was able to get Features to run upon switching to the 7.x-1.x-dev branch. I have been able to create a "backup" module for my D7 site using Features...
However, I have not yet had a chance to restore that module on another D7 installation. That part will have to wait until I finish building all my content types. I might be on the same boat as pontus. Will report back as soon as I know more.
Comment #41
setvik commentedI have a feature created with alpha version of views and previous version of features and ctools.
Upgraded to the latest Views, CTools, and Features (dev), I still get the bug described in the OP when running drush feature-update [featurename].
Attached patch got rid of the error and allows me to update my existing feature.
Comment #42
dasjojust wanted to note, that i solved some strange (like #21) errors by moving from the outdated ctools master branch to the current 7.x-1.x branch
Comment #43
dasjosorry
edit: see related #1113060: Fix upgrade path for recent views integration changes
Comment #44
robertom commentedSame problem of #39...
I am able to export with -dev of features from my dev server, but when I import features on staging server all my views in the feature are gone (not appear on admin/structure/views). I have to import it manually.
Comment #45
olafveerman commentedsubscribe
Comment #46
irakli commentedI think update path is a separate issue, and since dasjo has already created an issue about it: http://drupal.org/node/1113060, I don't think it should be discussed here.
Comment #47
robertom commentedYou are correct. I have misunderstood the scope of the separate issue.
Sorry for noise
Comment #49
googletorp commentedThe original problem still seems to be an issue:
Error: Call to undefined function views_include_default_views() in /modules/contrib/features/features.module,
err: line 333
Looking at an earlier version of Views, this commit should fix the issue: commit on sandbox
Or you can take a look at the diff
Comment #50
idflood commentedSolution proposed in #49 seems to be working. After applying the patch the page load with some warnings but this may not be related to this specific issue.
Comment #51
zarudnyi commentedSolution in #49 works for me. Thank You.
Comment #52
dasjothere is some strange behaviour of default/overridden states of view features.
Comment #53
nedjoPatch for the diff in #49 attached. Also attaching -p0 version, since this is likely to be needed in drush make files.
This fix is needed because views_include_default_views() was removed from views.
Comment #54
Bevan commenteddasjo; I have also been experiencing this, but I think it is a different bug, possibly related to very recent versions of views-7.x-3.x. I have moved this to #1157048: Feature-packages appear overridden when they are not.
Comment #55
Anonymous (not verified) commenteddrush make patch in #53 works for me
Comment #56
febbraro commentedFixed, thanks nedjo.
http://drupalcode.org/project/features.git/commit/16c28a8