Problem/Motivation
After making changes to the content translation settings, the cached bundles are not cleared.
To reproduce:
1. Create a node for article on a new site
2. Enable translation or article bundle
3. Go to the node
The translate tab is not visible.
That's because the generic entity API checks the translate flag in the bundle information, which is only updated after their cache is cleared.
Proposed resolution
Clear cached bundles after making changes to the content translation settings.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#22 | 2450251-xjm.22.patch | 4.16 KB | alexpott |
#22 | 19-22-interdiff.txt | 1.38 KB | alexpott |
#19 | 2450251-xjm.19.patch | 5.54 KB | alexpott |
#19 | 17-19-interdiff.txt | 904 bytes | alexpott |
#17 | 2450251-xjm.17.patch | 5.54 KB | alexpott |
Comments
Comment #1
BerdirComment #2
sasanikolic CreditAttribution: sasanikolic at MD Systems GmbH commentedComment #3
sasanikolic CreditAttribution: sasanikolic at MD Systems GmbH commentedBetter solution... Tried reproducing and it works.
Comment #4
BerdirComment #6
alexpottPatch from #2472373: Translation tab is not displayed when Book module has been enabled previously
Comment #8
BerdirTest looks good to me.
Comment #9
xjmSo this is a clear bugfix, and it makes sense to reset the cache after doing stuff. However, #2419649: Content translation schema updates are not triggered consistently moved the rebuild from the end of that submit handler up to its current location in HEAD. This reverts that. Can we look into why and at least document that we're not reverting something that the other issue didn't sufficiently test?
Comment #10
alexpottI've repeated the steps outlined in the issue summary of #2419649: Content translation schema updates are not triggered consistently and the fail reported in step 6 does not occur with this patch applied. Also that patch added a test which this is not causing to fail.
Comment #11
xjmThanks @alexpott.
So the test coverage here relies on not clearing the cache programmatically in the test, and using the UI to do the configuration. Can we expand this comment to document this more clearly, so that someone in the future doesn't "optimize" things by converting this to API calls? (Since there are no assertions in the hunk.)
Sorry for not thinking of this in the previous review.
Comment #12
alexpottSure np. And in fact we can remove more of the API calls than I originally saw.
Setting straight back to rtbc since only removing code from a test and adding a comment.
Comment #13
xjmSorry, the attached is what I meant. The comment addition in #12 still doesn't stop someone from removing the
drupalPostForm()
call to make the test faster (and it's a little confusing), but adding a comment right above thedrupalPostForm()
would. "Translatable through the UI" was also ambiguous and confused me on first read -- it is intended to mean "use the UI to make it translatable" but could be read as "make it so the UI can be used to translate it".Comment #15
xjmSame interdiff from #12, just with a non-bogus patch.
Comment #16
xjmComment #17
alexpottIn #12 I introduced some parts of another patch :(
Thanks for fixing the comment @xjm.
Comment #18
jibranShouldn't it be submission?
Comment #19
alexpott@jibran good spot.
Comment #22
alexpottMore unrelated patch to remove. alexpott--
Comment #23
jibranThanks @alexpott for fixing the patch. Back to RTBC.
Comment #24
xjmI don't know why my login is in the name of this patch, but @amateescu convinced me yesterday it's okay for me to commit it. Normal bugfix, so prioritized during the beta. Committed and pushed to 8.0.x, thanks!