I installed and enabled Entity translation and Entity translation upgrade. After playing with the functionality using my (almost empty) test site, I tried to uninstall the module. (Not that I did not like it, — the functionality is OK, I just wanted to check various things under the base install without any contributed modules.) After disabling both ET and ET upgrade, I went to Uninstall tab under Modules, unisnstalled ET upgrade, then ET, and... I still see both under Modules->List. When I select Uninstall again, it says there is nothing that can be uninstalled (or, when there are other modules that can, the Uninstall tab shows those other modules only, without ET and ET upgrade).

I actually tried both alpha1 and dev, and it happens exactly the same way to any of the two versions.

Francesco, I can provide access to my test installation if needed, so that you could play with it if you need to check something.

Comments

Status:Active» Postponed

I have just found that the same happens to some other modules, e.g. Internationalization. I will investigate more, but at the moment it seems that Entity translation itself is not the culprit :).

Status:Postponed» Closed (works as designed)

Status:Closed (works as designed)» Needs work

Hrm.. but the problem is that if you accidently enable this for a field and that field fails to work ... you are stuck b/c after uninstall and re-install it actually causes the problem to return. Unless you have some solution to change this manually I can't seem to see how to actually work around this. In my case it's actually a locked field (commerce_order_total) that I accidently enabled for translation.

Status:Needs work» Postponed (maintainer needs more info)

I'd tend to agree with #2: what is ET supposed to do to fix this?

Well I would imagine that during the uninstall it could go through and remove any attributes that have been set for fields. At present it appears that uninstalling it doesn't remove that stuff. So when I try to 'undo' what I've done I cannot. Reinstalling the module just results in the field being translatable again :/

In my case, the field is locked (commerce_order_total) and when it's set to translatable it doesn't work anymore. I realize that not being translate friendly is a bug for commerce so I'll report that there but I do think it makes sense to remove the other stuff.

ET does not add any attribute, it just changes the value of a core attribute which is field translatability. Are you suggesting that we should switch all fields to 'translatable' = FALSE when uninstalling ET? Sorry, but this is a straight won't fix from me: this would imply automatically running an operation that may cause data loss. You should manually set back your fields to untranslatable and only then uninstall ET.

Yeah... actually my issue *might* be a bug relating to locked fields .. I could open another issue....

If you install Drupal Commerce and set the commerce order total to translatable you can't actually undo that operation. I had to hack the code in order to display teh "Disable translation". It kept thinking (even though i deleted all the field data) that there was field data :/

I don't have a clue whether this is b/c that field is locked or not.. but regardless I was never able to disable the translation like you can for other fields.... and as a result I could never restore the field back to the way it was before... that's more what I was getting at with the uninstall.

Code snippet below:

  if (field_has_data($field)) {
    $path = "admin/config/regional/entity_translation/translatable/$field_name";
    $status = $translatable ? $title : t('This field is shared among the entity translations.');
    $link_title = !$translatable ? t('Enable translation') : t('Disable translation');
    $form['field']['translatable'] = array(
      '#prefix' => '<div class="translatable"><label>' . $label . '</label>',
      '#suffix' => '</div>',
      'message' => array(
        '#markup' => $status . ' ',
      ),
      'link' => array(
        '#type' => 'link',
        '#title' => $link_title,
        '#href' => $path,
        '#options' => array('query' => drupal_get_destination()),
        '#access' => user_access('toggle field translatability'),
      ),
    );
  }

Title:Entity translation cannot be uninstalled (under Drupal 7.12)Field translatabliity cannot be disabled on locked fields

Is this title more accurate? I looked through the code snippet above and I cannot see any difference with the actual code. Can you provide a patch with your fix?

Title:Field translatabliity cannot be disabled on locked fieldsField translatability cannot be disabled on locked fields