Panels 3: Navigating an Upgrade from Alpha to Beta

Alpha?!

Often alpha releases come with the tag line:

Not for production release!

It's true, alpha releases are not stable and can be inconsistent. A team of developers and a careful eye towards your use case versus the can be leveraged to minimize any dangers. A more appropriate warning would be:

Not for production systems if you do not carefully evaluate your use case and/or you don't have a team of developers willing to create patches

After all, patches are the open source way to get things ready for production by end users. I'm excited by the functionality panels will bring to the drupal world. Besides defining site layouts, Panels can be the tool an admin can use to piece together a site (solving an obvious problem, Total Control).

Developers developing and Administrators administrating makes for a wonderful world.

Navigating Panels3 Alpha to Beta

The first thing to do is cleanly upgrade the panels code to the latest beta release, commit to your (D)VCS of choice, and run update.php

At this point, you'll find all your custom content types are gone, your site is broken and empty of all your hard work. Good, now we ford the river.

module_panels_content_types is now in ctools

modulename_panels_content_types() becomes modulename_ctools_content_types()

Content Types category and title are now declared in the hook

Before they had been part of the content type callback. Now the category and title are declared in the content_types() hook.

 

$items['software_buyers_guide'] = array (
   
'title' => t('Software Buyers Guide'),
   
'single' => FALSE,
   
'content_types' => 'csr_library_content_types_software_buyers_guide',
   
'title callback' => 'csr_library_content_types_software_buyers_guide_title',
   
'render callback' => 'csr_library_content_types_software_buyers_guide_render',
    ); 

?>

 

becomes

 

$items['software_buyers_guide'] = array (
   
'title' => t('Software Buyers Guide'),
   
'single' => TRUE,
   
'description' => 'A listing of software buyers guide',
   
'category' => 'Main Content Panes',
   
'content_types' => 'csr_library_content_types_software_buyers_guide',
   
'title callback' => 'csr_library_content_types_software_buyers_guide_title',
   
'render callback' => 'csr_library_content_types_software_buyers_guide_render',
    ); 

?>

 

Notice that single is now set to TRUE, and the description and category are declared.

Views Content Panes

To allow views to declare Content Panes the module Views Content Panes needs to be enabled again. The only change here is that it is now located in the Views category in admin/build/modules

Beta?!

Your content types should be available and loaded back into panels and your site is happy and healthy.

Topics