Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
nodechanges_form_alter()
injects a textarea field (as per #1733658: Inject a comment body text area and input format selector into the node edit form) to a node edit form, which is used to populate a real comment body or similar field on submission of the node edit form.
However, if you have customised your Comments fields and added additional fields, none of those fields will be rendered.
I propose that instead of jamming a textarea field into the nod edit form, we attach all the Comment fields to the form (excluding the changes field).
Working on a solution.
Comment | File | Size | Author |
---|---|---|---|
#10 | fill_comment_and_put_in_preview_mode-2416177-10.patch | 1.49 KB | formatC'vt |
#2 | comment_fields-2416177-2.patch | 9.94 KB | Deciphered |
Comments
Comment #1
drummGood timing, this should help #2340363: Add issue comment attribution.
Comment #2
Deciphered CreditAttribution: Deciphered commentedAs promised.
Important notes:
I think that pretty much covers it.
Comment #3
drumm#1561780: Tests would be nice to have right now.
Agreed on all your notes, especially adding the
hook_update_N()
.I think the whole comment preview is good to see.
Comment #5
drummI went ahead and pushed #2. I haven't run into any problems with it yet.
Comment #6
drummComment #7
drummComment #9
formatC'vt CreditAttribution: formatC'vt commentedhm, i have subscription for all issues but don't receive e-mail about this one =)
good idea and i found a bug in ckeditor module with already deleted
$form['nodechanges_comment_body']
element =)Comment #10
formatC'vt CreditAttribution: formatC'vt commentedi think we should fill comment with user data and put comment in preview mode.
Patch attached.
Comment #12
drummGood idea, committed.
Comment #13
drummI found an Entity Reference field does not save properly because the field_attach_* functions need to be called, eventually calling
_field_filter_items()
.Comment #15
drummThat commit covers
field_attach_form_validate()
andfield_attach_submit()
. That's enough to get an Entity Reference field working. I think there are other field_attach_* calls missing. There may be some more cleanup that can be done.Comment #16
formatC'vt CreditAttribution: formatC'vt commentedNow we have a node edit form with attached comment fields, i think we also need a comment edit form with attached node fields.
I want to use nodechanges with ajax_comments module =)
Comment #17
drummLet's call this done. Other issues can be opened as followups.