drupalmu_helper_context doesn't detect comment editing

Gary Feldman - June 12, 2009 - 13:15
Project:DrupalMU Helper
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

If you edit a comment to a blog that you've previously submitted, you should get the same theme as you did when first creating the comment using reply. However, the drupalmu_helper_context function doesn't detect this case.

This is non-trivial to fix, because the path only contains the cid, unlike the reply case. For Drupal 6, I believe the simplest approach is to call _comment_load on the cid to get the nid, then load the node to get the uid. For Drupal 7, it may be best to wait to see how comments evolve.

#1

Gary Feldman - June 12, 2009 - 13:28

For what it's worth, the views module already calls _comment_load, so there's precedent. Still, the approach I suggested is ugly and slow.

 
 

Drupal is a registered trademark of Dries Buytaert.