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.

Comments

leahmd’s picture

Issue summary: View changes
reg’s picture

I came across the same problem. Here's the fix that works for me.

alcroito’s picture

Status: Active » Fixed

Thanks, committed your patch, with some slight modifications.

  • Placinta committed a0c7d75 on 7.x-1.x authored by Reg
    Issue #2298357 by Reg | tfmedia: Fixed PDO Exception, comment field.
    
reg’s picture

You 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.

reg’s picture

Just 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.

Status: Fixed » Closed (fixed)

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

leahmd’s picture

Brilliant, thank you so much for fixing this.

atomjani’s picture

How 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?

leahmd’s picture

You can use PHPadmin (usually present in cPanel) or similar to delete the node_convert_templates table.