I test on local the D6/D7 upgrade path
When trying to migrate autocomplete_widgets fields I get the following PDO exception.
• Error creating field field_responsable
• exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 Erreur de syntaxe près de ') NULL DEFAULT NULL, `field_responsable_format` VARCHAR(255) NULL DEFAULT NULL,' à la ligne 9' in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\includes\database\database.inc:2135 Stack trace: #0 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\includes\database\database.inc(2135): PDOStatement->execute(Array) #1 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\includes\database\database.inc(664): DatabaseStatementBase->execute(Array, Array) #2 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\includes\database\schema.inc(656): DatabaseConnection->query('CREATE TABLE {f...') #3 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\includes\database\database.inc(2684): DatabaseSchema->createTable('field_data_fiel...', Array) #4 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\modules\field\modules\field_sql_storage\field_sql_storage.module(216): db_create_table('field_data_fiel...', Array) #5 [internal function]: field_sql_storage_field_storage_create_field(Array) #6 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\includes\module.inc(794): call_user_func_array('field_sql_stora...', Array) #7 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\modules\field\field.crud.inc(176): module_invoke('field_sql_stora...', 'field_storage_c...', Array) #8 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\sites\all\modules\cck\modules\content_migrate\includes\content_migrate.admin.inc(239): field_create_field(Array) #9 [internal function]: _content_migrate_batch_process_create_fields('field_responsab...', Array) #10 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\includes\batch.inc(284): call_user_func_array('_content_migrat...', Array) #11 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\includes\batch.inc(161): _batch_process() #12 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\includes\batch.inc(80): _batch_do() #13 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\modules\system\system.admin.inc(2333): _batch_page() #14 [internal function]: system_batch_page() #15 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\includes\menu.inc(503): call_user_func_array('system_batch_pa...', Array) #16 C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdb11Mig1\index.php(21): menu_execute_active_handler() #17 {main}
Do you understand what is the problem?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | content_migrate-add_autocomplete_support-1417626-5.patch | 737 bytes | mustanggb |
| #4 | content_migrate-add_autocomplete_support-1417626-4.patch | 700 bytes | mustanggb |
Comments
Comment #1
sahuni commentedBecause my website has just 4 fields with autocompletion, I can change the widget to text field, then upgrade to D7 and then redo autocomplete. So I'm not blocked. But it's not a solution to that code issue.
Comment #2
mustanggb commentedComment #3
mustanggb commentedSeems like they are being converted from longtext (text_long) to varchar (text) with an empty length. They should probably remain as longtext.
Comment #4
mustanggb commentedSomething like this perhaps.IGNORE
Comment #5
mustanggb commentedLets try that again.
Comment #6
boobaaLooks like this can, therefore should be done in
autocomplete_widgets_content_migrate_field_alter(), but I'm not really sure about it. I have ran into the same issue while upgrading a site that uses text_noderef.module, and the following code have solved it for me (gonna commit it later on into that module, when I'm totally satisfied with all the results):OTOH, this raises the question if this issue should and/or could be solved in general, leaving it in the state I've found.
Comment #7
aleagi commentedSubscribe
Comment #8
jromine commentedPatch for this in autocomplete_widgets module posted in #1790758: PDO exception on migrate autocomplete_widgets longtext field
Comment #9
colanLooks like it's not CCK's problem anymore, but at least the bug in the other queue is fixed.