Right now the language_content_type_$type variables are left in an inconsistent state when this module is disabled, since no other modules know what to do with the value ENTITY_TRANSLATION_ENABLED. ET should reset each content type using entity translation to not use translation, and users should be warned about this change. However, disabling and then re-enabling the module should be a no-op, so a list of content types using entity translation needs to be stored on disable and then used to restore the content type settings on re-enable (with users warned that these settings were altered). This stored information should be completely wiped on module uninstall. However, on the UX principle of "least surprise", if the translation settings for a content type were changed between when the module was disabled and when it was re-enabled, no action should be taken because we assume the user made the change on purpose and wants it that way.

Comments

plach’s picture

Status: Needs review » Needs work
StatusFileSize
new2.73 KB

I made a couple of small tweaks to avoid showing the warning when no value is actually restored and shortened a messages. We have a problem with the current approach:

  1. disable ET
  2. change the content type to enabled
  3. change it again to disabled
  4. enable ET

ET settings are restored altough one has explictly set the content type ML support to disabled.

mvc’s picture

StatusFileSize
new3.1 KB

new patch which incorporates version from comment #1 and handles problem case described in that comment.

mvc’s picture

Status: Needs work » Needs review
Issue tags: +montreal
StatusFileSize
new3.3 KB

Correction for handling of problem case described in comment #1 based on review by plach.

mvc’s picture

StatusFileSize
new2.56 KB

plach noticed that the solution in #3 doesn't work because we can't distinguish between users explicitly changing the translation options and users simply changing anything else on the content type editing form. so we're giving up on that corner case for now and going back to the approach of the original patch.

plach’s picture

Status: Needs review » Fixed
StatusFileSize
new2.73 KB

I restored the check that at least one content type has been restored (pun not intended :).

Committed to HEAD, thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 5f5ec9e on master, et-permissions-1829630, factory, et-fc, revisions authored by mvc, committed by plach:
    Issue #1280660 by mvc, plach: Fixed Gracefully handle module being...

  • Commit 5f5ec9e on master, et-permissions-1829630, factory, et-fc, revisions, workbench authored by mvc, committed by plach:
    Issue #1280660 by mvc, plach: Fixed Gracefully handle module being...