Project:vBulletin to Drupal
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

Hey Guys,

I've been modifying this awesome module to meet my specific needs and came across a couple of bugs in the process.

~line 650:
//Import Comments
The sql query has 1 too many variables...

It was...

db_query($sql,
    _vbtodrupal_db_prefix_tables('{comments}', $drupal_db_prefix, $drupal_db_name),
    VBTODRUPAL_ADD_TO_IDS,
    VBTODRUPAL_ADD_TO_IDS,
    VBTODRUPAL_ADD_TO_IDS,
    VBTODRUPAL_ADD_TO_IDS,
    COMMENT_PUBLISHED,
    COMMENT_NOT_PUBLISHED,
    serialize(array(0 => 1)));

It should be...

db_query($sql,
    _vbtodrupal_db_prefix_tables('{comments}', $drupal_db_prefix, $drupal_db_name),
    VBTODRUPAL_ADD_TO_IDS,
    VBTODRUPAL_ADD_TO_IDS,
    VBTODRUPAL_ADD_TO_IDS,
    COMMENT_PUBLISHED,
    COMMENT_NOT_PUBLISHED,
    serialize(array(0 => 1)));

Also regarding this same issue the constants COMMENT_PUBLISHED and COMMENT_NOT_PUBLISHED aren't defined in the module. Need to add...

define('COMMENT_PUBLISHED', 0);
define('COMMENT_NOT_PUBLISHED', 1);

One final thing I found important was when importing nodes and comments the "changed" column is left blank(0)... This was causing me problems on getting my search to index the nodes. I took the easy route and just set the changed value to the same as the created.

Hope that helps... Thanks for the awesome module. Cheers

Comments

#1

Status:active» closed (won't fix)

I'm going to be honest and say that I've never understood this bug report, sorry.

Checking the number of variables passed to db_query() in the module code it looks right. Also, we shouldn't need to re-define COMMENT_PUBLISHED and COMMENT_NOT_PUBLISHED since comment.module is a dependency of this (via forum.module).

That problem with the changed column definitely deserves a look though, I will check that.

nobody click here