When I edit a node with a translated file (image) and I click on Edit Media, I expect to be able to edit the translated version of that entity, not the original.

- I've a content type Article with a Dutch translation.
- I've enable translations for the entity File and created a Dutch translation for a specific image
- While in the English interface, I've added the image to a node.
- When I switch the interface to Dutch I see the translated node and even the translated image beloning to the node
- When I EDIT the node, I have a button 'Edit media' (see screenshot). This opens a modal frame with a form to edit the image. This form however, shows the english version of the image. Not the Dutch version, as I expected.

See screenshot.

Schermafbeelding 2012-03-06 om 09.12.31.png

Files: 
CommentFileSizeAuthor
#17 media-et_integration-1470018-17.interdiff.do_not_test.patch625 bytesbforchhammer
#17 media-et_integration-1470018-17.patch3.5 KBbforchhammer
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]
#15 media-et_integration-1470018-15.interdiff.do_not_test.patch1.53 KBbforchhammer
#15 media-et_integration-1470018-15.patch3.52 KBbforchhammer
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]
#11 media-et_integration-1470018-11.interdiff.do_not_test.patch771 bytesplach
#11 media-et_integration-1470018-11.patch3.4 KBplach
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]
#10 media-et_integration-1470018-10.patch3.3 KBplach
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]
#8 media-et_integration-1470018-8.patch3.5 KBplach
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]
#7 media-integration-2.x-dev-1470018.patch672 bytesbforchhammer
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]
Schermafbeelding 2012-03-06 om 09.12.31.png32.56 KBBarisW

Comments

Subscribe,

I`have the same issue on file entities. I have an image file entities with some attached fields in french (I use Media with entity translation). when I add an image and translate it to english, all go well. but if I want to edit the translation, the edit form display the source entity that in french ?

Status:Active» Postponed

This should be fixed once #1282018: Improve UX of language-aware entity forms is committed.

Status:Postponed» Active

Does not work properly yet. Let's fix this.

Title:'Edit media' on a node/edit form points to untranslated version of the entityProvide media integration
Category:bug» feature

We need better integration with the Media project.

[double post removed]

StatusFileSize
new672 bytes
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

Attached patch (against media-7.x-2.x) adds ET support for the media edit modal popup, with the multiple-paths patch in #1418076-18: Allow for multiple base paths... We should probably open a new issue in the media issue queue once the multiple path issue is resolved.

Title:Provide media integrationProvide Entity Translation integration
Project:Entity Translation» Media
Version:7.x-1.x-dev» 7.x-2.x-dev
Component:User interface» Code
Status:Active» Needs review
StatusFileSize
new3.5 KB
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

The attached patch adds ET integration for the Media modal popup (requires #1418644-7: Add multilingual support for files and #1418076-22: Allow for multiple base paths).

Better UX: now the link to create a translation uses the canonical local action theming. Moreover now it is possible to create a translation only in if it is missing the current content language. This way context is always kept and pressing the 'Edit media' button allows to edit the values for the current language or create a translation for the current language. Full administration of translations is still available at file/%file/translate.

StatusFileSize
new3.3 KB
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

Ahem

StatusFileSize
new3.4 KB
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]
new771 bytes

Minor fix.

This and #1418644: Add multilingual support for files are the last blockers for the first Entity Translation beta. It would be great to have some feedback ASAP :)

Status:Needs review» Needs work

Awesome, patch #11 works very well and makes translating media files soooo much easier! :)

I only have two questions/issues and think it's RTBC otherwise:

+++ b/includes/MediaEntityTranslationHandler.inc
@@ -0,0 +1,54 @@
+    if (isset($form['actions']['delete_translation'])) {
+      $form['actions']['delete_translation']['#weight'] = 10;
+    }

This is only for the "file/x/edit" pages, right? For the media path scheme it doesn't do anything because the "delete translation" action is removed anyway... So does this belong into media or should it be in file_entity?

+++ b/includes/MediaEntityTranslationHandler.inc
@@ -0,0 +1,54 @@
+        $form['media_add_translation'] = array(
+          '#weight' => -110,
+          '#markup' => '<ul class="action-links"><li>' . $link . '</li></ul>',
+        );

Can we reuse some existing theming function for this?

This is only for the "file/x/edit" pages, right? For the media path scheme it doesn't do anything because the "delete translation" action is removed anyway... So does this belong into media or should it be in file_entity?

Nice catch :) This actually would belong to File Entity, but I thought it didn't make sense to introduce a FileEntityTranslationHandler just for those two lines. Do you think it's worth?

Can we reuse some existing theming function for this?

I wasn't able to find a proper theming function. See Bartik's page.tpl.php.

Status:Needs work» Needs review
StatusFileSize
new3.52 KB
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]
new1.53 KB

Nice catch :) This actually would belong to File Entity, but I thought it didn't make sense to introduce a FileEntityTranslationHandler just for those two lines. Do you think it's worth

No, I guess not. Let's leave it in here for now. (Unless media module maintainers object?)

I wasn't able to find a proper theming function. See Bartik's page.tpl.php.

Hm, looks like there's no theming function for the list then, but we can use 'menu_local_action' for the link... patch updated.

Status:Needs review» Reviewed & tested by the community

Works for me.

StatusFileSize
new3.5 KB
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]
new625 bytes

Updated the patch for the change introduced in #1799770: Update id and bundle when setting a wrapped entity (removed $entity_id from handler constructor).

That was the last serious API change for Entity Translation before beta1. You can commit #17 safely, if you are happy with it.

Status:Reviewed & tested by the community» Fixed

I am happy with it, thought at first that this should be in file entity module, but i see this is about media path.
thanks both

Status:Fixed» Closed (fixed)

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

the problem still occurs also in the latest Dev-Version.

My Image Entity has 3 Fields (Title, Alt and Caption). If I edit a Node an click on the Edit Button for the Image, it does not pass the current Form Language so that the Fields can be edited in the actual form language.

Is there any Workaround or Solution?

Issue summary:View changes
Status:Closed (fixed)» Active

Please see comment #21

Status:Active» Closed (fixed)

please open a new issue, this one is long dead now