Closed (duplicate)
Project:
Content Construction Kit (CCK)
Version:
7.x-2.x-dev
Component:
upgrade path
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2011 at 19:30 UTC
Updated:
21 May 2011 at 09:40 UTC
Drupal 6.20 updated to D 7.0:
On admin/structure/content_migrate do I get:
Notice: Undefined index: default_image in content_migrate_filefield_field_alter() (line 24 of /Users/steinmb/htdocs/sites/smbjorklund.com/drupal7_versjon/drupal/sites/all/modules/cck/modules/content_migrate/modules/content_migrate.filefield.inc).
Not entire sure what I'm looking for but this is the output from:
print_r($instance_value['widget']['settings']
Array
(
[file_extensions] => jpg jpeg png
[file_path] => images/[user]
[max_filesize_per_file] =>
[max_filesize_per_node] =>
[file_widgets] =>
[max_resolution] => 0
[min_resolution] => 0
[alt] =>
[custom_alt] => 1
[title] =>
[custom_title] => 1
[progress_indicator] => bar
[title_type] => textfield
[use_default_image] => 0
[filefield_sources] => Array
(
[reference] => reference
[remote] => remote
[attach] => 0
)
[filefield_source_attach_path] => file_attach
[filefield_source_attach_absolute] => 0
[filefield_source_attach_mode] => move
[filefield_source_autocomplete] => 0
[insert] => 1
[insert_styles] => Array
(
[lightbox2--Medium--Large] => lightbox2--Medium--Large
[lightbox2--Small--Large] => lightbox2--Small--Large
[auto] => 0
[link] => 0
[image] => 0
[imagecache_Large] => 0
[lightbox2--Large--Large] => 0
[lightbox2--Large--Medium] => 0
[lightbox2--Large--original] => 0
[lightbox2--Large--Small] => 0
[lightbox2--Large--Thumb] => 0
[lightbox2--link--Large] => 0
[lightbox2--link--Medium] => 0
[lightbox2--link--Small] => 0
[lightbox2--link--Thumb] => 0
[lightbox2--Medium--Medium] => 0
[lightbox2--Medium--original] => 0
[lightbox2--Medium--Small] => 0
[lightbox2--Medium--Thumb] => 0
[lightbox2--original--Large] => 0
[lightbox2--original--Medium] => 0
[lightbox2--original--Small] => 0
[lightbox2--original--Thumb] => 0
[lightbox2--Small--Medium] => 0
[lightbox2--Small--original] => 0
[lightbox2--Small--Small] => 0
[lightbox2--Small--Thumb] => 0
[lightbox2--Thumb--Large] => 0
[lightbox2--Thumb--Medium] => 0
[lightbox2--Thumb--original] => 0
[lightbox2--Thumb--Small] => 0
[lightbox2--Thumb--Thumb] => 0
[imagecache_Medium] => 0
[imagecache_Small] => 0
[imagecache_Thumb] => 0
)
[insert_default] => auto
[insert_class] =>
[insert_width] =>
)
Array
(
[file_extensions] => png gif jpg jpeg
[file_path] =>
[progress_indicator] => bar
[max_filesize_per_file] =>
[max_filesize_per_node] =>
[max_resolution] => 0
[min_resolution] => 0
[alt] =>
[custom_alt] => 1
[title] =>
[custom_title] => 1
[title_type] => textfield
[default_image] =>
[use_default_image] => 0
[filefield_sources] => Array
(
[remote] => remote
[reference] => reference
[attach] => attach
)
[filefield_source_attach_path] => file_attach
[filefield_source_attach_absolute] => 0
[filefield_source_attach_mode] => move
[filefield_source_autocomplete] => 0
[insert] => 1
[insert_styles] => Array
(
[lightbox2--Medium--Large] => lightbox2--Medium--Large
[lightbox2--Small--Large] => lightbox2--Small--Large
[lightbox2--Thumb--Large] => lightbox2--Thumb--Large
[imagecache_Medium] => imagecache_Medium
[imagecache_Small] => imagecache_Small
[imagecache_Thumb] => imagecache_Thumb
[auto] => 0
[link] => 0
[image] => 0
[imagecache_Large] => 0
[lightbox2--Large--Large] => 0
[lightbox2--Large--Medium] => 0
[lightbox2--Large--original] => 0
[lightbox2--Large--Small] => 0
[lightbox2--Large--Thumb] => 0
[lightbox2--link--Large] => 0
[lightbox2--link--Medium] => 0
[lightbox2--link--Small] => 0
[lightbox2--link--Thumb] => 0
[lightbox2--Medium--Medium] => 0
[lightbox2--Medium--original] => 0
[lightbox2--Medium--Small] => 0
[lightbox2--Medium--Thumb] => 0
[lightbox2--original--Large] => 0
[lightbox2--original--Medium] => 0
[lightbox2--original--Small] => 0
[lightbox2--original--Thumb] => 0
[lightbox2--Small--Medium] => 0
[lightbox2--Small--original] => 0
[lightbox2--Small--Small] => 0
[lightbox2--Small--Thumb] => 0
[lightbox2--Thumb--Medium] => 0
[lightbox2--Thumb--original] => 0
[lightbox2--Thumb--Small] => 0
[lightbox2--Thumb--Thumb] => 0
)
[insert_default] => imagecache_Medium
[insert_class] =>
[insert_width] =>
)
Comments
Comment #1
steinmb commentedMigrated a few file fields and ignoring the warning reported in #1. The URI is not correctly except fid 42 (see table below) that belong to a test article I created after the update. files like the fid 37 path is wrong on node render and are getting something like:
sites/smbjorklund.no/files/sites/smbjorklund.no/files/files/webmaster/Chinatown.m4v and I have verified that all settings on admin/config/media/file-system is correct.
SELECT `fid`,`filename`,`uri` FROM `file_managed`;Comment #2
karens commentedNot enough information for me to reproduce. First see if it is still an issue in the latest code. If so I need to know exactly how the source field was configured. What kind of widget were you using? If you were using some widget other than the basic Imagefield widget, recent changes to the code may fix the problems.
Comment #3
steinmb commentedHi Karen
Out of time restrains, I manually changed the db table 'file_managed' to get the site up and running in D7. As far as I remember it was just a regular imagefield widget, nothing fancy. Even if I manually got it up and running on D7, could I try running the migration one more time. I still got a copy of the D6 db around. This time with the latest code, but If you think this is a lesser important edge case, do I not mind if you close this issue. Your the CKK-ninja, your call :)
Edit:
I checked the widgets in one of my backups:
widget type => 'imagefield_widget'
widget type => 'filefield_widget'
widget type => 'imagefield_widget'
Also had a quick look at the warning. Does it come from that the default image is not defined? Debugging with:
dvm($instance_value['widget']['settings']['default_image'], 'default_image');confirmed that:default_image => NULL
Edit again:
Crossposted on #1031734: PHP Notice: Undefined index: default_image in content_migrate_filefield_field_alter() where I confirm that the problem is still present in the latest version.
Comment #4
karens commentedWe don't need two reports about the same issue.