Download & Extend

Fix Drupal 5 -> 6 Upgrade Path

Project:FileField
Version:6.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:quicksketch
Status:closed (fixed)

Issue Summary

Currently our Drupal 5 to Drupal 6 upgrade path does not work for FileField. It does not enable any of the previously used FileFields and their "status" is left at 0 in the database, effectively making all FileFields disappear.

Generally speaking this is usually fixed with a call like this:

<?php
  content_associate_fields
('filefield');
?>

We also need to use the "safe" version of content_fields() during the upgrade, since content_fields() won't list any fields that are disabled. Instead we should use content_types_install(). This patch corrects these problems and restores the upgrade path from Drupal 5 as far as I've tested.

AttachmentSize
filefield_upgrade_fix.patch3.83 KB

Comments

#1

Status:needs review» fixed

Committed.

#2

Looks like we've got a new problem with the upgrade now. Using content_install_types() gets us the current definition as defined by modules, and doesn't actually check the current database. So rather than starting with the current schema and specifying the new one, we start with the new one and we need to specify the old one.

This patch specifies both the new and the old schema to fix this problem.

AttachmentSize
filefield_upgrade_columns.patch 1.22 KB

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here