Closed (fixed)
Project:
Comment Alter
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Apr 2013 at 22:56 UTC
Updated:
10 May 2013 at 16:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
dsnopekPatch is attached! Please let me know what you think.
Comment #2
boobaaOkay, now I know what the score is about this issue. In fact, one may have the very same fields on the comment entity's bundle being displayed and the content type itself. In this case your patch fails, since it overwrites comment form widgets of comment fields with node form widgets of comment_alterable node fields. I think this is the most important reason of the current implementation, namely putting comment_altered form widgets into comment_alter's own form part. OTOH, this causes that field_group and form widgets' weight doesn't get into account.
So it seems that basically there are two reasons which are mutually exclusive:
I'm all in if there's a solution that is acceptable for both, though I wonder if it's possible at all.
Comment #3
dsnopekSo, my patch makes #2 work and #1 was already broken due to the way we're using hook_field_extra_fields().
Personally, I don't think we should support having fields that are BOTH alterable from a comment and also attached to the comment itself. I think we should just disallow that - it would be very confusing to the user, ie., how could they tell two version of the exact same field apart? Of course, other fields can be attached to the comment entity! Just not the exact same ones.
What do you think?
Comment #4
dsnopekI've written a new patch (against latest git) which does the same as the old patch PLUS:
Personally, I think this is the best solution. I can't think of any valid use case where the user wants the exact same field on the comment twice (and it'd be impossible to tell the different between them).
Please let me know what you think!
Comment #5
boobaaWell, it looks like your approach is limiting the user, which is undesirable and turned out to be unnecessary. Git now contains a solution that does allow having (eg.) 'body' field on both the node and the comment, while still supporting comment_altering it. IOW, this has been fixed by now.
Comment #6
dsnopekYeah, I guess you're right - it is unnecessary. :-) Prefixing the fields is what comment_driven does too. I just couldn't think of a single use-case where having the same field on comment twice would be desirable and not totally confusing.
But I'm perfectly happy with this approach! It definitely wins on flexibility.