Hard coded IDs in Comment Module

Starting the new year off with some Lullabot podcast listening while the little one naps. There are lots of blog posts to come from it on various topics. The latest podcast is a live show of a question and answer session from Do it With Drupal.

The first question that kicked off the session was about frustration in theming comments and the comment form in Drupal. As the answers say on the on the podcast this is slightly better in Drupal 6 than it is in Drupal 5. However there's a pretty serious bug that rapidly becomes a deal-stopper when trying to do much with comments. The problem lurks in comment_render(). And following that link you'll notice it's not fixed in Drupal 7 yet either.

Fortunately there is an issue on Drupal.org for working on it. However to date we haven't really solved the problem. On one level the current solution which basically moves the theming function basically makes overriding the theming of comment lists possible but a better way is needed. The problem with the current solution is it's too specific to comments. There are other places where it would be very handy to be able to pass a nested array and have that rendered either in a threaded or flat version for comments as well as any other place a module might want to generate a list items to be displayed in a similar way.

Basically it seems something along the lines of:

comment_render() generates a nested array of comment things to be displayed. This in turn calls theme_threaded() which, with a set of arguments, will out of the box theme a structured array in either a flat or nested display.

Let's figure out what the best way to solve this is and get it fixed in Drupal 7 sooner rather than later.