there was a bug in the project module that was causing troubles for projects where the nightly tarballs weren't getting published as valid releases (http://drupal.org/node/67877). the problem was that when you delete a project node, project_project_delete() wasn't doing a thorough job to delete all the records associated with that project. it cleaned out the {project_projects} and {project_issues} tables, but left {project_releases}, {project_comments} and {project_subscriptions} alone. since there were records in {project_releases} that had the same filename (e.g. "lightbox2-cvs.tar.gz") but the wrong nid, the tarballs wouldn't be published into the current nid (duplicate key errors), and much grief was created.
killes and i removed most of the duplicate records in project_releases we could find, and i've just commited the patch for #67877. however, there are almost certainly some other stale records lingering in {project_releases}, and definitely some cruft in {project_comments} and {project_subscriptions}.
in fact, i just saw that the bug is still effecting http://drupal.org/node/48774 (the "vote_up_down" module, see http://drupal.org/node/50984).
instead of tracking this all down manually, someone should just do some LEFT JOIN queries in the drupal.org DB to find records in these tables where the nid is no longer in the {nodes} table. then, you just have to remove all records from those tables with nids that no longer exist. if i have the chance, i'll write the queries in here (though i have no means to run them myself, of course)...
i think this will resolve a lot of the lingering mysteries with why releases aren't getting published, projects not listed in the download pages, etc.
Comments
Comment #1
dwwnote: vote_up_down was actually a different problem, which is now resolved. but, we should still do this kind of cleaning, anyway...
Comment #2
dwwpatch posted in http://drupal.org/node/67877 for a project_update_3() to do exactly this. please review that if you're interested in this.
Comment #3
dwwnew patch for project_update_3() posted in http://drupal.org/node/67877. i think this one's RTBC -- it works perfectly on mysql and pgsql, and even reports the # of deleted rows. ;)
Comment #4
dwwok, i commited project_update_3(), which solves this problem. therefore, the solution to this issue is to update project.install on d.o, and run the update. setting to RTBC, which the most appropriate status for this. ;)
thanks,
-derek
p.s. we really need per-project status values... (something i've been thinking about a little bit, but that's another story).
Comment #5
killes@www.drop.org commenteddb is updated.
Comment #6
(not verified) commented