1- CCK version: 6.x-2.2
2- Imagefield version: 6.x-3.0
3- Permissions: Files Directory: 755
4- Download method: haven't down loaded anything yet
5- Imagefield configuration: ??

6, 7 & 8: I'm trying to import a Content type from an old site to a new site. Before doing that, I installed and enabled all the necessary modules in the new site. Then imported the Content Type. Everything is fine, all the fields are here except a field using ImageField

After importing the content type, I receive this message:

"This content type has inactive fields. Inactive fields are not included in lists of available fields until their modules are enabled"

In addition to the missing field, when I try to create an Image Field, the option doesn't appear...

It's like the module is not installed or enabled but my "/admin/build/modules" page shows that the module is here, enabled (Content and Filefield are enabled as well)

Anyine has an idea?

Thanks...

Comments

quicksketch’s picture

Category: bug » support

It's because the type definition has changed between old versions of ImageField and the new version. ImageField used to define it's own field type, "Image", but now it just uses FileFields "File" type and puts an image widget on top of it. What you're doing is not supported by Content Copy module, since it expects the same modules to be running on both versions of the site.

However, you can do what other users have been doing for the failed Ubercart installations, which was basically doing the same thing. Visit update.php, and select update 6100 for just ImageField, then run the update. This converts the old format of ImageFields to the new one that uses FileField. Note that normally I would NEVER recommend doing this, manually selecting updates is extremely dangerous and can ruin your database. However I've looked through these updates to make sure it wasn't doing anything bad for the users that were doing this anyway. So as of the 3.0 version, this is a safe approach, though rather unconventional.

Tilt_11’s picture

Thanks a lot for your help.
Unfortunately, for ImageField, the drop down menu only proposes me versions 6001, 6002, 6003, 6004 and 6005.

I've read somewhere else about people running 6001, but their problem was not exactly the same. If someone could confirm before I do something wrong, it would be nice...

Thanks again anyway!

quicksketch’s picture

Oh, sure enough. Sorry I was thinking of FileField. Yes, start with update 6001. Before you do anything it'd be a good idea to make a database backup.

Tilt_11’s picture

Thanks again!

It seems to work, however, I received these error messages after updating the DB:

user warning: Unknown column 'field_photo_fid' in 'content_type_staff' query: ALTER TABLE content_type_staff CHANGE field_photo_fid `field_photo_fid` INT DEFAULT NULL in /homepages/14/d264392921/htdocs/TynesideFC/includes/database.mysql-common.inc on line 520.
user warning: Unknown column 'field_photo_fid' in 'where clause' query: UPDATE content_type_staff SET field_photo_fid = NULL WHERE field_photo_fid = 0 in /homepages/14/d264392921/htdocs/TynesideFC/sites/all/modules/cck/modules/addedmodules/imagefield/imagefield.install on line 111.
user warning: Unknown column 'field_photo_fid' in 'IN/ALL/ANY subquery' query: UPDATE content_type_staff SET field_photo_fid = NULL WHERE field_photo_fid NOT IN (SELECT fid FROM files) in /homepages/14/d264392921/htdocs/TynesideFC/sites/all/modules/cck/modules/addedmodules/imagefield/imagefield.install on line 114.

AND

Update #6004
Failed: ALTER TABLE {content_type_staff} CHANGE field_photo_fid `field_photo_fid` INT DEFAULT NULL
Failed: UPDATE {content_type_staff} SET field_photo_fid = NULL WHERE field_photo_fid = 0
Failed: UPDATE {content_type_staff} SET field_photo_fid = NULL WHERE field_photo_fid NOT IN (SELECT fid FROM {files})
ALTER TABLE {content_type_staff} ADD `field_photo_list` TINYINT DEFAULT NULL
ALTER TABLE {content_type_staff} ADD `field_photo_data` TEXT DEFAULT NULL

But it seems to work so far...I have a backup of my database ready if needed...

quicksketch’s picture

Hmm, a lack of an FID column is going to cause some serious problems. You probably won't be able to properly save or edit nodes with that field. There's no reason why it should be missing entirely, since it's the most important piece of data stored by FileField (the FID lets FileField load a file from the "files" table). This seems like something you should definitely try to remedy before continuing with your site transfer.

Really, I don't know what you should do in this situation. Like I said above, what you're doing isn't supported or intended by Content Copy module. An alternative approach would be to start over, download the same versions of the modules, do the transfer, then run update.php.

Tilt_11’s picture

Yeah...

The Content Type I had already transfered is now fine, but now, I have imported another one, and half of the fields didn't follow.

First I had a 500 error, then reloaded the page. The newly transfered Content Type was here, but with half of its fields missing (not the image one though!)

When I started the new site, I copied the modules from the old one, but then updated them before importing he Content Types...Looks like I shoudn't have done that...

quicksketch’s picture

Status: Active » Closed (fixed)

Closing after lack of activity.