As reported in different places, #2542826: Language synchronization logic breaks term title translation caused a regression breaking at least the tests for Title as well as the tests for Entity Translation and Entity modules.
The easiest way out of the regression would be to revert that commit.
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | D7_title_fix_head_tests-3061862-27.patch | 2.66 KB | joseph.olstad |
| #19 | D7_title_fix_head_tests-3061862-19.patch | 2.85 KB | joseph.olstad |
Comments
Comment #2
joseph.olstadComment #3
joseph.olstadComment #5
joseph.olstadsee my comment here:
#1991988-67: Adding a new translation overwrites the English/source field value
there's a patch that seems to improve the test results from 4 errors down to only 2 errors.
review that please
Comment #6
joseph.olstadhere is a revert all the way back to Oct 2017 when the tests used to pass.
just for testing purposes, do not actually use this patch.
Comment #7
joseph.olstadso lets figure out why?
Comment #8
joseph.olstadComment #9
stefanos.petrakisThis is - most probably - caused by #2542826: Language synchronization logic breaks term title translation, in that issue it is reported that the title's tests are broken, however the code changes where committed without fixing the tests (and the source of the breakage in the first place).
Comment #10
joseph.olstadHi Stefanos, thanks for the background info, it will help us pinpoint the test changes needed.
Comment #11
joseph.olstadOk, not sure if this patch will help.
Comment #12
joseph.olstadjust a hunch, but ya maybe instead of LANGUAGE_NONE we have to look for the default language
Other places in the test results to update
I changed one , but maybe have to change all of these from LANGUAGE_NONE to the default language using the language_default() function to grab it, then grab the code $langdefault->language
short on time here
Comment #14
joseph.olstadah maybe not.
ok revert the patch that breaks tests.Comment #15
joseph.olstadtry again
Comment #16
joseph.olstadok another patch comming
Comment #17
joseph.olstadComment #18
joseph.olstadthis should fix the php 5.3.x and php 5.4.x fails.
Comment #19
joseph.olstadok minor simplification of code here.
Comment #20
stefanos.petrakisBumping this to "Major" since it has lots of side-effects, apart from the actual tests failing.
Comment #21
stefanos.petrakisComment #22
joseph.olstadstefanos, do you have an opinion on this patch? I'm of the opinion that it's the best thing we have currently. Until something better comes along.
Comment #23
stefanos.petrakisHi @joseph, I agree, this is the best alternative at the moment. I don't even think there is a better option, hope I am wrong.
Regarding your patch: simply reversing the patch from #2542826: Language synchronization logic breaks term title translation would have been sufficient, however a minor improvement to the tests is not a bad idea, I linked the related issue that caused that error.
I only have one comment:
Nesting these two ifs could be avoided; you could give
$entity_languagea default value of NULL and then rewrite this block placing the two ifs one after the other instead of nesting them.Comment #24
joseph.olstadStefanos, I stand by the nested if, only want to call entity_language() if the entity type is set, otherwise lacking type for entity_language() ?
Not sure how setting $entity_language to NULL will avoid this nesting?
Comment #25
joseph.olstadAs for the straight up revert see patch 17 in comment 16, php 5.3 and 5.4 fails
Comment #26
stefanos.petrakisHere is what I meant:
But, looking at the codes again, I think there is an even simpler rewrite, we don't need empty().
Comment #27
joseph.olstadhmm, ok, if this patch fails I'll try that.
not even sure if we need the tertiary logic
trying this
Comment #28
joseph.olstadComment #29
joseph.olstadStefanos, any objections?
Comment #31
ram4nd commentedComment #32
stefanos.petrakisYou are right joseph, the tertiary was superfluous, my bad.
Good work!
Comment #33
joseph.olstad@stefanos, do you recommend going ahead with a release with this fix?
Comment #34
joseph.olstadThanks @ram4nd , we might as well push a release with this.