On a fresh install of Drupal, with only Features enabled from the module list, I went to enable a feature I'd built on another site.

I got this error:

Fatal error: Class 'panels_display' not found in /Users/joachim/Sites/geton-drupal-6/sites/all/modules/geton_feature_page_bookings/geton_feature_page_bookings.defaults.inc on line 48

The relevant code is:

/**
 * Helper to implementation of hook_default_page_manager_pages().
 */
function _geton_feature_page_bookings_default_page_manager_pages() {
  $page = new stdClass;
  // SNIP
  // this is line 48:
  $display = new panels_display;

Comments

joachim’s picture

The problem appears to be that panels module is not enabled. The error makes the site unusable as it affects the module admin page too.

joachim’s picture

The problem is that panels has not been added as a dependency of a feature that implements ctools pages which themselves contain panels.

yhahn’s picture

Title: fatal error when enabling a feature with a panel display » TASK: Page manager dependency detection
Category: bug » task

I am not a heavy user of page manager but I do know that this is a case where dependency and component detection could be added, similar to the logic that happens in the Views integration in Features now.

If anyone is up to the task, would love to see a patch for this.

recrit’s picture

without diving into features or ctools, you can always alter the export in a custom module. The following code worked for us to resolve the panels dependency since all of our pages have panels.

function YOURMODULE_features_export_alter(&$export, $module_name) {
  if (isset($export['dependencies']) && isset($export['dependencies']['page_manager'])) {
    $export['dependencies']['panels'] = 'panels';
  }
}
mpotter’s picture

Status: Active » Closed (won't fix)

Closing this for lack of activity. Please re-open this issue if you can reproduce it in the latest version.