update.php in Drupal 6 now runs the update functions for all modules that have a schema version > -1. So even modules that have been disabled, but not uninstalled, will be updated. This causes a problem on upgrade from Drupal 5 -> Drupal 6, since comment module and nodecomment are completely incompatible.

Specifically I've been getting "function exists" errors, which is odd since nodecomment wraps all of its comment_ functions in if(function_exists()) blocks. This means that comment module is being enabled after nodecomment has been loaded, so there is little we can do to remedy it in the module itself.

The easy way to avoid all of this would be to uninstall comment module. Easier said than done. There is no comment_uninstall(), so there is no way through the UI to uninstall comment module.

This patch works by uninstalling comment module in nodecomment_install() and also in an update function. This means that this patch must be installed and update.php needs to be run on a Drupal 5 site before upgrading to Drupal 6.

CommentFileSizeAuthor
nodecomment-update.patch890 byteszroger

Comments

crea’s picture

Status: Needs review » Closed (fixed)

Closing this. 5.x is unsupported but I want to keep the ability to upgrade from 5.x to the 6.x-2.x branch. I believe this is no longer relevant since 2.x branch is compatible with comment module, but if someone encounters this, please reopen.