Hi, I've tried 1.2 and also the 1.x dev release and I have an unknown error on converting nodes with both versions. It does convert the type but it's a bit messy.
From the log:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'site_db1.field_data_comment_body' doesn't exist: UPDATE field_data_comment_body AS cb LEFT JOIN comment AS c ON cb.entity_id = c.cid AND cb.entity_type = :entity_type SET cb.bundle = :new_bundle WHERE c.nid = :nid ; Array ( [:entity_type] => comment [:nid] => 1662 [:new_bundle] => comment_node_clinic ) in comment_node_convert_change() (line 26 of /home/site/public_html/drupaldir/sites/default/modules/node_convert/modules/comment.node_convert_behavior.inc).
As well as a PHP notice:
Notice: Undefined index: safe_value in node_convert_format_field_value_helper() (line 422 of /home/site/public_html/drupaldir/sites/default/modules/node_convert/node_convert.util.inc).
Before this, I did have an internal server error while running update.php after upgrading the module from 1.1, not sure if it's related.
I have attempted to reinstall the module, deactivating and uninstalling first and then I had another unknown error message when attempting to reactivate the module, with the log error:
DatabaseSchemaObjectExistsException: Table node_convert_templates already exists. in DatabaseSchema->createTable() (line 657 of /home/site/public_html/drupaldir/includes/database/schema.inc).
The module shows as activated but the tab to Convert no longer appears. I had no convert templates so I will deactivate again, delete that table and try to activate the latest release version again or roll back to 1.1.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | node_convert-table_not_found-2298357-2.patch | 1.3 KB | reg |
Comments
Comment #1
leahmd commentedComment #2
reg commentedI came across the same problem. Here's the fix that works for me.
Comment #3
alcroito commentedThanks, committed your patch, with some slight modifications.
Comment #5
reg commentedYou are most welcome, it's a great module and much needed for someone like me who typically goes in and fixes up not so well put together installations.
Could you have a look at the comment I made on this issue (https://www.drupal.org/node/1225442), specifically the image which shows the call stack to the problem? I'm hoping for a little insight to move forward on it.
Comment #6
reg commentedJust a thought but you probably can remove the code that gets the prefix for the database tables just by putting the table names in curly braces { } . From memory Drupal will take care of the prefix for you when you do this and is the more correct way to handle table names in Drupal -- sorry I didn't remember this sooner.
Comment #8
leahmd commentedBrilliant, thank you so much for fixing this.
Comment #9
atomjani commentedHow can I fix this bug in my drupal? Step to step. I can't delete this modul, and when I want re enable there is this sql error, that Table node_convert_templates already exists. I rewrite node_convert with dev version in filesystem?
Comment #10
leahmd commentedYou can use PHPadmin (usually present in cPanel) or similar to delete the node_convert_templates table.