Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Getting this:
Notice: Undefined index: default_image in content_migrate_content_migrate_field_alter() (line 426 of content_migrate.module)
when viewing "admin/structure/content_migrate"
I guess my fields don't have default_image set for some reason? Here's a quick patch to just confirm first.
Comment | File | Size | Author |
---|---|---|---|
#13 | cck-remove_php_notice-1031734-13.patch | 1.13 KB | jenlampton |
cck-default_image.patch | 766 bytes | loganfsmyth |
Comments
Comment #1
loganfsmyth CreditAttribution: loganfsmyth commentedOops, forgot to set it for review :P
Comment #2
yched CreditAttribution: yched commentedI don't think this is how it should be adressed.
Core Field API makes sure that $field and $instance arrays have all the expected entries in the 'settings' section. I'd suggest that $field and $instance arrays formed by content_migrate behave the same ?
Comment #3
KarenS CreditAttribution: KarenS commentedI am unable to get an error like this in the current code. Is this still an issue? If so, I need steps to reproduce it.
Comment #4
steinmb CreditAttribution: steinmb commentedCrossposting #1100580: Undefined index: default_image in content_migrate_filefield_field_alter() and confirm that the latest CCK dev. (11.5.2011) still throw this warning.
Comment #5
marcoka CreditAttribution: marcoka commentedconfirming that too.
Notice: Undefined index: default_image in content_migrate_filefield_field_alter() (line 25 of /var/www/WORKSPACE_DRUPAL/test/sites/all/modules/cck/modules/content_migrate/modules/content_migrate.filefield.inc).
Notice: Undefined index: label in _content_migrate_get_instance_values() (line 177 of /var/www/WORKSPACE_DRUPAL/test/sites/all/modules/cck/modules/content_migrate/includes/content_migrate.values.inc).
Notice: Undefined index: full in _content_migrate_get_instance_values() (line 226 of /var/www/WORKSPACE_DRUPAL/Ktest/sites/all/modules/cck/modules/content_migrate/includes/content_migrate.values.inc).
the field looks like this in the db
http://screensnapr.com/v/R2qwAW.png
so in my case the update from d5->d6->d7 F**#ed up the settings
so went back to d6 and saved the settings of the image field and copied over the data from d6 table to d7 table.
but changes nothing
http://screensnapr.com/v/gRgO5L.png
Comment #6
verres CreditAttribution: verres commentedgetting the same error message:
"Notice: Undefined index: default_image in content_migrate_filefield_field_alter() (line 25 of /var/...)"
Comment #7
verres CreditAttribution: verres commentedconfirm this is still occurring -- just upgraded to D7...
content migrate has the following error at top:
Notice: Undefined index: default_image in content_migrate_filefield_field_alter() (line 25 of
has any progress been made to understand where to look to solve this?
thanks
Comment #8
seaneffel CreditAttribution: seaneffel commentedHave got this error now while running the migrate fields functions. A series of 10 matching errors show up for me:
Notice: Undefined index: default_image in content_migrate_filefield_field_alter() (line 25 of /Users/sean/dev/icateens_d7/sites/all/modules/cck/modules/content_migrate/modules/content_migrate.filefield.inc).
It is not clear if this is an issue that just throws warnings because of bad behavior of this module or if this is something I have to diagnose in regards to the health of my fields. In the prior D6 site, I had several file field (filefield module) that were image fields (imagefield module) and none of them were configured to show default images. I have over 30 instances of those kinds of fields assigned to content types, I can't see why there is pattern for the ten identical errors.
Comment #9
allanpeda CreditAttribution: allanpeda commentedI am getting this error too, and it's a new Drupal 7 install (one month old). I encountered it trying to create a File (Attachment) type.
Comment #10
OFF CreditAttribution: OFF commentedNotice: Undefined index: default_image in content_migrate_filefield_field_alter() (line 25 of /home/off/data/www/clubwave.ru/sites/all/modules/cck/modules/content_migrate/modules/content_migrate.filefield.inc).
Notice: Undefined index: custom_alt in content_migrate_filefield_instance_alter() (line 121 of /home/off/data/www/clubwave.ru/sites/all/modules/cck/modules/content_migrate/modules/content_migrate.filefield.inc).
Notice: Undefined index: custom_title in content_migrate_filefield_instance_alter() (line 123 of /home/off/data/www/clubwave.ru/sites/all/modules/cck/modules/content_migrate/modules/content_migrate.filefield.inc).
Notice: Undefined index: custom_alt in content_migrate_filefield_instance_alter() (line 121 of /home/off/data/www/clubwave.ru/sites/all/modules/cck/modules/content_migrate/modules/content_migrate.filefield.inc).
Notice: Undefined index: custom_title in content_migrate_filefield_instance_alter() (line 123 of /home/off/data/www/clubwave.ru/sites/all/modules/cck/modules/content_migrate/modules/content_migrate.filefield.inc).
Comment #11
axle_foley00 CreditAttribution: axle_foley00 commentedI am getting this error also when migrating CCK fields from D6 to D7:
Any other suggestions on how to fix this?
Comment #12
jenlamptonI can confirm that this error still appears in the latest version (2012-Nov-19). I'm also upgrading D5 -> D6 -> D7, though this is my third D5 -> D7 upgrade and the first where I've had this problem. None of the file/image fields on this D5 site were configured to use a default image.
Comment #13
jenlamptonHere's a quick patch that removes the PHP notice. I don't think it's a problem we need to be worried about, not unless the
default_image
value necessary for the migration even when there was no value set in previous versions.Comment #14
mvcworks for me, thanks!
Comment #15
colanThanks! Fixed in 1de9756.