Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As noted in #1114410: Replace hook_translation_info() with hook_entity_info(), that change broke my TMGMT tests and it looks like it already fails with the initial creation of the language-specific comment and it can be tracked down to that commit, so my guess is that it's a bug in ET.
Comment | File | Size | Author |
---|---|---|---|
#9 | et-comment-1760270-9.patch | 661 bytes | plach |
#7 | et-comment-1760270-7.patch | 1.89 KB | plach |
Comments
Comment #1
plachI suspect this is related to #1534674: Comment field language is completely broken.
Comment #2
plach#1280546: Introduce a language selection widget for every entity should help with this, however comment translation cannot properly work until #1534674: Comment field language is completely broken is fixed.
Comment #3
slowflyer CreditAttribution: slowflyer commentedtried to fix it. #1534674: Comment field language is completely broken
Comment #4
plachAs per #2.
Comment #5
BerdirI've just tested again with an up to date entity_translation version and the tests almost* pass again, so it looks like maybe the referenced issue in #2 has fixed my problem. Can't really help with the core issue as I'm not actually using comment translation so I don't have a site with actual data or so.
* The only problem is an exception in translation.handler.inc: "Undefined index: #type". Easy fix, the comment form has a top level element without a #type, just an wrapper for other stuff. Will create an issue with a patch in a second. EDIT: Here we go: #1802452: Notice for form elements without a #type
So, from my point of view, this issue can be considered resolved once the core issue is resolved.
Comment #6
plachAnyone willing to have a look to the core issue and review/RTBC it?
Comment #7
plachWhen the core issue is fixed we will probably need something like this.
Comment #8
plachComment #9
plachUpdated patch: this still relies on #1534674: Comment field language is completely broken.
Comment #10
plachGreen
Comment #11
plachThe core issue has been committed!
Comment #12
plachOk, I'll be bold and RTBC this: it is going in in a few days, last chance to test it :)
Comment #13
plach#9: et-comment-1760270-9.patch queued for re-testing.
Comment #14
BerdirLatest 7.x and ET dev with the patch applied.
Yay! :)
I did have to change the comment body field language from en to und when creating the comment initially, is that by design due to the changes? I assume it is, because everything was correctly extracted and translated afterwards...
Uploaded my patch that will enable it again to #1879250-1: Re-enable comment entity source translation tests.
Comment #15
plach@Berdir:
Yes, this is the intended behavior: now the entity language is used to generate field widgets, but initially an entity has
LANGUAGE_NONE
.Committed and pushed #9, thanks for the quick feedback!
Comment #16.0
(not verified) CreditAttribution: commentedUpdated issue summary.