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.
- Disable node entity translation on admin/config/regional/translation (uncheck 'node')
- Clear cache
- Visit admin/config/regional/translation and check an entity ('node') which was not previously checked
- Visit any page which requires entity information (like /node/1 in this case)
- Result:
Fatal error: Cannot access empty property in ...sites/all/modules/translation/includes/translation.handler.inc on line 207
Comment | File | Size | Author |
---|---|---|---|
#1 | translation-clear-cache-after-changing-content-translation-settings-1032728-1.patch | 487 bytes | das-peter |
Comments
Comment #1
das-peter CreditAttribution: das-peter commentedThanks rfay for helping me to verify this issue :)
Attached patch adds a
entity_info_cache_clear()
in the form submit handler of the Content Translation settings form. That way we can make sure the entity_info array is up to date on the next usage.Comment #2
rfayThis seems logical and does resolve the issue.
Comment #3
sunClosely related core issue: #996236: drupal_flush_all_caches() does not clear entity info cache
Made the comment a bit more concise:
Thanks for reporting, reviewing, and testing! Committed to HEAD.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.