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.
Steps to reproduce:
- Install Drupal and configure it to another language (eg. portuguese)
- Install content_copy.module
- Import a new node type at admin/content/types/import
The following error will happen:
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<create> ( vid int unsigned NOT NULL default '0', ' at line 1 query: CREATE TABLE content_type_<create> ( vid int unsigned NOT NULL default '0', nid int unsigned NOT NULL default '0', PRIMARY KEY (vid) ) /*!40100 DEFAULT CHARACTER SET utf8 */ in E:\xampplite\htdocs\drupal-5.0\includes\database.mysql.inc on line 172.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<create> ADD COLUMN field_reference_value longtext' at line 1 query: ALTER TABLE content_type_<create> ADD COLUMN field_reference_value longtext in E:\xampplite\htdocs\drupal-5.0\includes\database.mysql.inc on line 172.
* Uma escolha ilegal foi detectada. Por favor contacte o administrador do site.
* warning: array_merge() [function.array-merge]: Argument #1 is not an array in E:\xampplite\htdocs\drupal-5.0\sites\all\modules\cck\content_admin.inc on line 890.
* warning: array_merge() [function.array-merge]: Argument #1 is not an array in E:\xampplite\htdocs\drupal-5.0\sites\all\modules\cck\content_admin.inc on line 891.
Comment | File | Size | Author |
---|---|---|---|
#7 | content_copy.patch | 1.07 KB | smk-ka |
Comments
Comment #1
elgrad.info CreditAttribution: elgrad.info commentedSubscribing.
I have same problem with CCK & Advanced Profile.
Comment #2
brahms CreditAttribution: brahms commentedSubscribing.
I also have the same problem with CCK & Advanced Profile. Setting the interface language to english makes the content import work.
Comment #3
elgrad.info CreditAttribution: elgrad.info commentedThank you.
It decided my issue.
Comment #4
smk-ka CreditAttribution: smk-ka commentedTracked this down to two locations, in both cases t() is erroneously applied to the key of a select form field. This makes the if-conditions to always fail, and results in the content type never being created (to be precise, Drupal tries to create a content table
content_type_<created>
, which is not a valid SQL table name. Not hard to image that subsequent operations go wrong, causing the whole import operation to fail.)Comment #5
yched CreditAttribution: yched commentedfile under the new 'content_copy.module' component
Comment #6
magico CreditAttribution: magico commentedno patch attached.
Comment #7
smk-ka CreditAttribution: smk-ka commentedgrml...
Comment #8
brahms CreditAttribution: brahms commented@smk-ka:
I have just tested the patch from comment#7 with Content Copy 5.x-1.7. It solves the issue for the 5.x-1.7 revision of the module and so I set the status to patch (reviewed and tested by the community). Please include the bugfix into the 5.x-1.x-dev version and the next 5.x-1.8 release of the module.
In release 6.x-2.0-rc3 and probably in 6.x-2.0-dev of the module there are also the 2 comparisons with t('<create>') instead of '<create>'. Please fix those too.
Thank you.
Comment #9
yched CreditAttribution: yched commentedCommitted to D5 and D6. Thanks !
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.