[Web4lib] Drupal 6 upgrade problem

Jessie Keck jkeck at stanford.edu
Mon Dec 13 18:02:23 EST 2010


Hi all,
Sorry for any cross or double posting.  I accidentally sent this out from my gmail account and I think it got rejected.  I didn't see it come through on any of the lists so I'm resending.

I have been having an problem with the upgrade from Drupal 5 -6 (late, I know) and I am at my wits end.  I am writing to see if I can find anybody who might be able to help or can possibly point me in the right direction.  I am running into certain issues w/ my data not being migrated in the necessary ways to get them to work with the new code on the other end of the update.  I have tried searching around drupal.org and general web searches and I don't find anybody having the problems that I am.  I can't imagine that I'm really using Drupal in such a way that we are the only people that are seeing these problems, yet I can't find any other people who have the same problem.

This is the main issue that I'm seeing in the upgrade.  In Drupal 5 I was using views_panes (admin/panels/views).  This is how our users would enter their arguments such as content type and taxonomy terms into the pane configuration.  I would have the arguments set in the views panes to be "Input on pane configuration".  With the changes to views there are now variants.  Views panes now appear to be a view variant called content pane.  However; it doesn't appear that there is any part of the upgrade process that will migrate our old view panes to content pane variants.

This means that every singe content pane that uses one of these view_panes has had its arguments lost (although they are still in the db).  I would have to imagine that somebody would have to had run into this previously if it was a widespread issue.

I have looked around in the database and this is what I have found.  I'm looking primary in the panels_pane table.  One thing I notice right when I update is that the type column references views2 for a lot of my old views which doesn't appear to be correct in Drupal6.  I believe that this was how views_panes were previously referenced in drupal 5, but I don't think that's correct any longer.  This was causing an error on many of the panels that said something along the lines of "Unknown content type Views2".

I have created some content panes as they should be to see the other differences in the database.  Views panes have a type of views_panes while normal views is just views.  The subtype for views panes has the view name appended with -panel_page_1 while normal views just have the view name.  The serialized configuration array is vastly different between the two:

Drupal5 views panes:
'a:9:{s:5:"style";s:7:"default";s:14:"override_title";i:1;s:19:"override_title_text";s:27:"Alpha Recent Type/Term List";s:6:"css_id";s:0:"";s:9:"css_class";s:0:"";s:5:"title";s:29:"Alpha Recent Type/Term - List";s:4:"name";s:27:"alpha_recent_type_term_list";s:9:"arguments";a:2:{i:0;s:6:"Biblio";i:1;s:16:"Electrochemistry";}s:14:"nodes_per_page";s:1:"0";}'

Drupal6 views panes:
'a:7:{s:9:"arguments";a:2:{s:8:"nodetype";s:6:"biblio";s:9:"taxletter";s:16:"Electrochemistry";}s:9:"more_link";i:0;s:9:"use_pager";i:0;s:8:"pager_id";s:0:"";s:14:"items_per_page";s:1:"0";s:14:"override_title";i:1;s:19:"override_title_text";s:10:"panel_view";}'

So I could change all instances of views2 to views_panes, and append all of the subtypes with -panel_page_1 (and add the content pane view variant), however the serialized configuration array looks like it would be difficult to migrate.  It looks like in Drupal6 these arguments are defined with a string key instead of an integer (e.g. nodetype for node type and taxletter for taxonomy term).  So even if I write the code to migrate the data that we need I still wont know which arguments are which.  I suppose I could then go and read which possible arguments each view has but that's getting really complicated (not even getting into context arguments).

I would imagine that there would be some sort of process in the upgrade that would take the instances that people had inserted these panels panes and make the appropriate adjustments in the database however my looking through the various module's update processes yielded nothing useful.

This is kind of a complicated issue which has taken me some time to dig through.  Has anybody else seen a similar issue and have any thoughts?  Has anybody done a successful 5-6 upgrade on a site that is heavily using Panels, Views, and views_panes.  Is it possible that something in the upgrade process that is failing to get us to the steps that would normally do this and I just cant find it in the code?

The only option that I have found and has been suggested so far is to write a custom module to migrate the data for me.  While it would be a pain I am fully capable of doing this; however it seems to me like needing to do this is contradictory to why we are using Drupal in the first place.

Thank you very much in advance,
- Jessie Keck
Stanford University Libraires


More information about the Web4lib mailing list