Closed (fixed)
Project:
Scald: Media Management made easy
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 May 2014 at 07:08 UTC
Updated:
21 May 2014 at 21:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
nagy.balint commentedThe issue is caused by the fact that widget_form_alter is called for all values of the field (so all filled languages) even if we only submitted the english language at this time for example. But that will result in an error as the input will only have the english values then, but mee will try with all the other languages as well and fail.
Comment #2
nagy.balint commentedHere is a patch that introduces an isset check, however im not sure if this works in all situations, for me it seems to be fine.
Comment #3
nagy.balint commentedComment #4
jcisio commentedI think we could just modify this line to add the langcode:
if (isset($form_state['input'][$context['field']['field_name']])) {It was enough when the field had only one language, but it is no longer now when there is Entity Translation.
I don't have a set up right now, could you test it?
Comment #5
nagy.balint commentedYou are right, as if the original isset is false then this will be false as well, and if the original isset is true then this is equivalent to my previous patch.
Attached the simpler patch. Seems to work as well.
Comment #7
jcisio commentedI haven't tested, but this patch could never fail! So, committed. Thanks!