Hi

i done an update of d2d to 2.1 and 2.6 for migrate but then i get :

Migration failed with source plugin exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column                            [error]
'f.field_fichier_joint_innovation_description' in 'field list'

do is change migration class code for this update ?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

What type of field is field_fichier_joint_innovation? What does the source table for that field look like (what is the name of the column containing the description)?

mikeryan’s picture

Title: Unable to run migration after update to 2.1 » Error handling 'data' column in D6 file fields
Status: Postponed (maintainer needs more info) » Active

OK, this popped up in a project I'm involved with, I now know that #1971778: Migrate the image data (alt, title and description) by the Wizard is the source of the problem, looking into it...

aiphes’s picture

it's a classic single filefield..

mikeryan’s picture

Version: 7.x-2.1-beta1 » 7.x-2.x-dev
Assigned: Unassigned » mikeryan
Category: support » bug
Status: Active » Fixed

OK, fix committed.

aiphes’s picture

ok will update the module.thanks

aiphes’s picture

Status: Fixed » Active
FileSize
16.43 KB

after update i get this on analyze :

Analyzing D2D_BriseLamesNodes_PageInnovations

Migration analysis failed with source plugin exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column [error]
'f.field_fichier_joint_innovation_description' in 'field list'

attached code for details.
but on another test site i don't get error,so my code or db contain something that cause this.
does exist a way to have a downloadable file or something like this to print or paste the analysis report of a class in drush ?

boinkster’s picture

I get similar errors mapping the image Alt field on CCK image fields.

The source shows the Alt subfield as available. I'm not sure where this fails. It all works fine on CCK Images that don't have the ALT field enabled.

Looking at the D6 data structure, it is embedded in a '_data' column with this string: a:12:{s:3:"alt";s:10:"Date Night";s:3:"fid";s:2:"2...
Is there a way to pull from this column directly?

On import this message is returned:

Migration failed with source plugin exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'f.field_event_image_alt' in 'field list'

Here is the field mapping code from my module:

    $this->addFieldMapping('field_event_image_main', 'field_event_image')
         ->sourceMigration('JakesFile');
    $this->addFieldMapping('field_event_image_main:file_class')
         ->defaultValue('MigrateFileFid');
    $this->addFieldMapping('field_event_image_main:preserve_files')
         ->defaultValue(TRUE);
    $this->addFieldMapping('field_event_image_main:title')
         ->defaultValue(t('(c) 2013 Jakes on the Lake'));
    $this->addFieldMapping('field_event_image_main:alt', 'field_event_image:alt')
         ->defaultValue('');
    $this->addFieldMapping('field_event_image_main:language')
         ->defaultValue(LANGUAGE_NONE);

drush mfd shows:

EventNode Destination Fields
...
 Event Main Image                                                                     field_event_image_main
 Option: Implementation of MigrateFile to use                                         field_event_image_main:file_class
 Subfield: Language for the field                                                     field_event_image_main:language
 Option: Boolean indicating whether files should be preserved or deleted on rollback  field_event_image_main:preserve_files
 Subfield: String to be used as the alt value                                         field_event_image_main:alt
 Subfield: String to be used as the title value                                       field_event_image_main:title
...

drush mfs shows:

EventNode Source Fields
...
 Event Image                              field_event_image
 Event Image subfield                     field_event_image:list
 Event Image subfield                     field_event_image:alt
...

drush mm shows:

 Destination                            Source                          Default                   Description                                                                                                                       
 field_event_description                field_event_description
 field_event_description:format         field_event_description:format
 field_event_image_main                 field_event_image
 field_event_image_main:alt             field_event_image:alt
 field_event_image_main:file_class                                      MigrateFileFid
 field_event_image_main:language                                        und
 field_event_image_main:preserve_files                                  1
 field_event_image_main:title                                           (c) 2013 Jakes on the Lake
 field_legacy_nid                       nid                                                         We have a common field to save the D6 nid
tanc’s picture

In populateSourceFieldInfo() on line 142 of file migrate_d2d/d6/d6.inc there is a section which checks if the widget has custom_alt assigned and if so exposes a new field with an _alt at the end of the field name:

if (!empty($widget_settings['custom_alt'])) {
  $columns[$field_name . ':alt'] = $field_name . '_alt';
}

This means those fields will be checked for the alt rather than getting it from the field_n_data field as it should.

joep.hendrix’s picture

Priority: Normal » Critical

Same problem here, it is impossible to migrate field with alt enabled.

dafeder’s picture

Same here, and my field is actually on the content type table, so I can't migrate the content type at all.

graceman9’s picture

Line 104 in 'migrate_d2d/d6/node.inc'.

<?php
- (strpos($display_name, ':list') || strpos($display_name, ':description'))) {
+ (strpos($display_name, ':list') || strpos($display_name, ':description') || strpos($display_name, ':alt') || strpos($display_name, ':title'))) {
?>

This works for me, is this solution correct?

psegarel’s picture

#11 worked for me!

Angry Dan’s picture

A patch (for anyone who's in need of one) based on the commit from #4 (http://drupalcode.org/project/migrate_d2d.git/commitdiff/f87484fc53d036e...) and the fix in #11.

Just in case anyone else is looking for it.

oadaeh’s picture

Status: Active » Needs review
FileSize
790 bytes

Attached is a patch that does not include the changes that were already committed to the dev branch.

MegaChriz’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

#15 solves the error SQLSTATE[42S22]: Column not found: 1054 Unknown column [error] 'f.field_image_title' in 'field list' for me.

ShaunDychko’s picture

Confirmed #15 fixes

Migration failed with source plugin exception: SQLSTATE[42S22]:      [error]
Column not found: 1054 Unknown column
'f.field_news_image_landscape_alt' in 'field list'

Thank you very much!

eltrufa’s picture

I had the same problem and has been solved by #15.
Thanks.

kepford’s picture

Confirmed #15 applies and resolved issue.

  • Commit 8b4a56c on 7.x-2.x authored by oadaeh, committed by mikeryan:
    Issue #2021413 by oadaeh: Add alt and title to potentially serialized...
mikeryan’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

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

mvc’s picture

Status: Closed (fixed) » Active

I'm still getting Column not found: 1054 Unknown column [error] 'f.field_image_title' in 'field list' when the field "image" is in its own table in D6. We can't just call fieldExists("content_type_{$bundle}", "{$field_name}_title") when the column in question lives in content_field_image and not content_type_MYTYPE.

mikeryan’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

I've been trying to reproduce this issue without success. I've installed the latest filefield and imagefield modules on the D6 site, created two image fields on my blog content type - one single value so it's stored in content_type_blog, and one multi-value so it's stored in content_field_images. The one issue I did find was that the alt/title/description fields weren't being exposed as available source fields, but that shouldn't affect what happens at run time. Anyway, I mapped alt/title for both fields (no description field in D7) and migration successfully populated them without error.

There shouldn't be any recent change affecting this (since 11/13, anyway), but could you humor me and try it with the 2.6-rc2 version of migrate and latest -dev of migrate_d2d? Any more details to offer about your mappings and environment?

  • mikeryan committed d855233 on 7.x-2.x
    Issue #2021413 by mikeryan: Make sure alt/title/description subfields...
mikeryan’s picture

I have committed the fix to expose the fields.

mikeryan’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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