Driver not getting called

Jan 23, 2011 at 4:33 PM


I had a strange situation recently. I created my custom part (as always - driver + handler etc.) and marked it as Attachable in data migrations. This part relies only on dynamically computed data so it's not held in db (no tables created in data migrations file, an empty handler and no overrides on Editor methods in the driver). The driver isn't getting called after attaching the part to custom type (Comment) and then trying to display this type (eg. viewing blog post comments). All other parts of this type get displayed - mine not.

The only difference is that this part also has part type settings entered by the user when attaching it to his custom type.

It is really simple one and I created many similar parts before without problems.

Cheers, Piotr

Jan 23, 2011 at 5:09 PM

Nvm - my stupid mistake:) I created a backing ContentPartRecord and ContentPart relying on it but I forgot that I don't need a record because part is not being persisted to db...

- Piotr

Jan 23, 2011 at 6:16 PM

I looked into it and it is not my fault - I tried to add ContentPart to Comment type. Shapes for comments are displayed in some weird way so that parts other that CommentPart are not rendered. Is there any way to override display for comment list? I noticed that comments are rendered by ordinary RenderPartial with a list of CommentParts passed into it so it bypasses shape rendering:/

- Piotr

Jan 24, 2011 at 7:13 PM

I open this to track the comment/shape problem:

You should still be able to customize the template for the list even though they are not shapes, I think.