API page: https://api.drupal.org/api/drupal/core%21modules%21comment%21templates%2...
These variables are provided to give context about the parent comment (if any):
comment_parent: Full parent comment entity (if any).
parent_author: Equivalent to author for the parent comment.
parent_created: Equivalent to created for the parent comment.
There is comment_parent variable in comment.html.twig documentation which gives NULL result.
parent_comment provides comment entity so I think it is just documentation issue.
Comment | File | Size | Author |
---|---|---|---|
#8 | correct-comment-template-2945513-8.patch | 2.73 KB | MeenakshiG |
Comments
Comment #2
jpoesen CreditAttribution: jpoesen at Code Enigma commentedIndeed. In the doc block,
comment_parent
needs to be changed toparent_comment
.Patch provided.
Comment #3
jpoesen CreditAttribution: jpoesen at Code Enigma commentedComment #5
idebr CreditAttribution: idebr at ezCompany commented@jpoesen Thanks for creating a patch!
The comment.html.twig file is copied to several themes, so these files have to be updated as well:
Comment #6
johnny_aroza CreditAttribution: johnny_aroza as a volunteer and at Specbee commented@idebr
i have made the requested changes.
Comment #7
idebr CreditAttribution: idebr at ezCompany commented#6 @johnny Thanks for working on this issue!
The reference to 'comment_parent' should be updated to say 'parent_comment'.
In your patch, the comment is added instead.
Comment #8
MeenakshiG CreditAttribution: MeenakshiG at OpenSense Labs for DrupalFit commented@idebr The reference to 'comment_parent' is updated to 'parent_comment'.
Comment #9
idebr CreditAttribution: idebr at ezCompany commentedDid a scan in the Drupal core files to ensure there are no more incorrect references to the
comment_parent
. All occurrences have been replaced correctly in the patch in #8, so setting to RTBC!Comment #11
catchCommitted/pushed to 8.7.x and cherry-picked to 8.6.x. Thanks!