Hi all,
I have problem to make Features module work. In fact, after enabling the module Features, i tried to export features. After entering informations about my Features and submit, i get a white page. I saw a lot of screencasts showing how using features. Does anyone have any idea why it doesn't work?

Comments

yhahn’s picture

Status: Active » Postponed (maintainer needs more info)

Could you post the general specifications for your environment (OS, PHP, MySQL versions)?

fmitchell’s picture

Getting the same thing. I'm running mine with a version of Acquia Drupal. The error log states:

PHP Fatal error: Class 'view' not found in /Users/fredric/Sites/mamp/uzmosis/modules/acquia/date/includes/date_api.views_default.inc on line 5

Oddly enough, the default views I exported in my custom module (named 'Uzmosis') register the 'view' class just fine. The date module is enabled and everything works fine. I'm not sure if its because of how Drupal is running through the module code ('Features' comes before 'Views' alphabetically) when the feature is being built?

I'm running MAMP PRO on my mac with PHP 5.2.6, MySQL 5.0.41

fmitchell’s picture

Status: Postponed (maintainer needs more info) » Active

whoops. forgot to update the status.

pbz1912’s picture

Tried to import the lullabot views_gallery feature in acquia drupal and get this

Fatal error: Call to undefined function context_enabled_contexts() in D:\xampplite\htdocs\band\sites\all\modules\features\includes\features.context.inc on line 43

when I click on Actions - view.

It created the content types but not the views.

The status is constantly "checking.." whenever I enable the feature.

I'm running on xampp lite on windows PHP/5.2.6, MySQL/5.0.51b.

pasqualle’s picture

Status: Active » Postponed (maintainer needs more info)

@kaloucha: white screen is mostly an indication of memory issue. try to increase the memory_limit in php.ini

@caramelson: your error message is related to the date module. Can you enable the "date_browser" view on the admin/build/views page?

@pbz1912: you need to enable the context module

moshe weitzman’s picture

Title: Features module doesn't work » PHP Fatal error: Class 'view' not found
Version: 6.x-1.0-alpha5 » 6.x-1.0-beta1
Category: support » bug
Status: Postponed (maintainer needs more info) » Active

My error is below. I was just exporting content types and permissions so I don't get why Views was consulted at all. Perhaps thats a clue.

 Fatal error: Class 'view' not found in /Users/mw/clients/economist/svn/economist_druconomist/branches/sprint/drupal/sites/all/modules/views/modules/comment.views_default.inc on line 12

My backtrace

#	Time	Function	Location
1	0.0002	{main}( )	../index.php:0
2	0.0801	menu_execute_active_handler( )	../index.php:16
3	0.0804	call_user_func_array ( )	../menu.inc:348
4	0.0804	drupal_get_form( )	../menu.inc:0
5	0.0830	drupal_process_form( )	../form.inc:119
6	0.1843	form_execute_handlers( )	../form.inc:409
7	0.1844	features_export_form_submit( )	../form.inc:769
8	0.1846	features_populate( )	../features.export.inc:364
9	0.1846	_features_populate( )	../features.export.inc:424
10	0.2311	views_features_export( )	../features.export.inc:449
11	0.3734	module_invoke( )	../features.views.inc:151
12	0.3734	call_user_func_array ( )	../module.inc:450
13	0.3735	comment_views_default_views( )	../module.inc:0
q0rban’s picture

Subscribe

moshe weitzman’s picture

Seems like I get past the error by just including view.inc from my settings.php. Not that this is a proper solution.

yhahn’s picture

Assigned: kaloucha » yhahn
Status: Active » Needs review

I've committed a patch that I think should resolve this issue. Would love to get some additional testing before closing this one.

http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/features/in...

yhahn’s picture

Status: Needs review » Closed (fixed)

Closing, please reopen if it continues to occur.

kenorb’s picture

Version: 6.x-1.0-beta1 » 6.x-1.0-beta6
Status: Closed (fixed) » Needs work

My version: 6.x-1.0-beta6
It happen using drush with following command:

kenorb@NS8210H:~$ drush features-revert

Backtrace:

Call Stack:
    0.0011     126752   1. {main}() /home/kenorb/websites/ns/trunk/src/sites/all/modules/bro/drush/drush.php:0
    0.0233    1649168   2. drush_main() /home/kenorb/websites/ns/trunk/src/sites/all/modules/bro/drush/drush.php:40
    5.8184   69777080   3. drush_dispatch($command = array ('callback' => 'features_command_revert', 'description' => 'Revert a feature module on your site.', 'arguments' => array (), 'options' => array ('--force' => 'Force revert even if Features assumes components\' state are default.'), 'command' => 'features-revert', 'command-hook' => 'features-revert', 'bootstrap' => 6, 'commandfile' => 'features', 'path' => 'sites/all/modules/features', 'engines' => array (), 'examples' => array (), 'aliases' => array (), 'deprecated-aliases' => array (0 => 'features revert'), 'extras' => array (), 'core' => array (), 'scope' => 'site', 'drupal dependencies' => array (), 'drush dependencies' => array (), 'bootstrap_errors' => array (), 'hidden' => FALSE, 'callback-required-prefix' => 'drush_features_')) /home/kenorb/websites/ns/trunk/src/sites/all/modules/bro/drush/drush.php:90
    5.8188   69777416   4. call_user_func_array('features_command_revert', array ()) /home/kenorb/websites/ns/trunk/src/sites/all/modules/bro/drush/includes/drush.inc:51
    5.8188   69777416   5. features_command_revert() /home/kenorb/websites/ns/trunk/src/sites/all/modules/bro/drush/includes/drush.inc:0
    5.8189   69777416   6. features_command_list() /home/kenorb/websites/ns/trunk/src/sites/all/modules/features/features.drush.inc:257
   25.5719   75899364   7. features_get_storage($module_name = 'wcs') /home/kenorb/websites/ns/trunk/src/sites/all/modules/features/features.drush.inc:71
   25.5720   75899364   8. features_get_component_states($features = array (0 => 'wcs'), $rebuild_only = FALSE, $reset = ???) /home/kenorb/websites/ns/trunk/src/sites/all/modules/features/features.export.inc:507
   38.5567   78710612   9. features_get_signature($state = 'default', $module_name = 'wcs', $component = 'views', $reset = FALSE) /home/kenorb/websites/ns/trunk/src/sites/all/modules/features/features.export.inc:649
   38.5568   78710612  10. features_get_default($module_name = 'wcs', $component = 'views', $reset = FALSE) /home/kenorb/websites/ns/trunk/src/sites/all/modules/features/features.export.inc:524
   38.5660   78711408  11. module_invoke('wcs', 'views_default_views') /home/kenorb/websites/ns/trunk/src/sites/all/modules/features/features.export.inc:612
   38.5661   78711408  12. call_user_func_array('wcs_views_default_views', array ()) /home/kenorb/websites/ns/trunk/src/includes/module.inc:462
   38.5661   78711408  13. wcs_views_default_views() /home/kenorb/websites/ns/trunk/src/includes/module.inc:0
kenorb’s picture

Temporary workaround:

/**
 * Implementation of hook_views_default_views().
 */
function blah_views_default_views() {
    views_include("view"); // Make sure that the 'view' class is defined
...
Grayside’s picture

Status: Needs work » Closed (cannot reproduce)

This problem seems to have resolved itself in the course of time.

indydas’s picture

This issue happened when disabling a module that had custom exported views code in. Using views_include("view"); // Make sure that the 'view' class is defined in hook_views_default_views() fixed it for me too.

mariacha1’s picture

Issue summary: View changes

This happened to me when I tried to use a base feature to revert the views_view on a child feature in D7. The base feature didn't have any exported views associated with it, so I assume this was a problem with the order features were loaded. I resolved the issue by moving the update hook to the child feature.

In short:

my_base_feature.install contained the following:

function my_base_feature_update_7101() {
  features_revert(array('my_child_feature' => array('views_view')));
}

And I resolved it by moving it to my_child_feature.install:

function my_child_feature_update_7101() {
  features_revert(array('my_child_feature' => array('views_view')));
}

Leaving this here in case it helps someone else.

rakesh.gectcr’s picture

Well, I ran

update.php

, that done the trick for me ...