You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, yours truly recently saw that we had two constants both named MEDIA_TYPES and thought that one was just an incomplete version of the other. So, I metí la pata and combined them in #321, which is the real source of the current problem.
We clearly need two constants: one for all question types that collect media files (that's what MEDIA_TYPES is currently, after #321), and another constant for media COLUMN names.
We also need, unfortunately, special handling for existing asset versions that have media::file in the translated list 😐 in order to work around the existing damage.
To reproduce the problem, create an XLSForm with this in the survey sheet:
type
name
label::Ukrainian
label::English
text
interviewer_name_text
Введіть ім'я співробітника:
Enter interviewer's name
select_one_from_file oblast.csv
oblast
Область
Oblast
Create oblast.csv with the following contents:
name
label::Ukrainian
label::English
ck
Черкаська
Cherkasy
zht
Житомирська
Zhytomyr
Import the XLSForm into KoboToolbox and add oblast.csv as a form media file. Deploy, and create a submission. Attempt to export, see the following failure:
formpack.errors.TranslationError: Mismatched labels and translations: [Введіть ім'я співробітника:, Enter interviewer's name] [Ukrainian, English, None] 2!=3
`Mismatched labels and translations` error when attempting to load a
schema that contains multiple languages as well as a
`select_one_from_file` or `select_multiple_from_file` that has been
expanded to have a `file` column as performed by #314
It looks like what happened is that
MEDIA_TYPES
was originally added with the right stuff:And then, in the same PR, those were prefixed with
media::
and added to the list of translated columns 🆗https://github.com/kobotoolbox/formpack/pull/280/files#diff-5382e2c7532fd5627ec49791c7f53cc8c5a39f865903c702bf1151be4dccfd99R177-R194
However, yours truly recently saw that we had two constants both named
MEDIA_TYPES
and thought that one was just an incomplete version of the other. So, I metí la pata and combined them in #321, which is the real source of the current problem.We clearly need two constants: one for all question types that collect media files (that's what
MEDIA_TYPES
is currently, after #321), and another constant for media COLUMN names.We also need, unfortunately, special handling for existing asset versions that have
media::file
in thetranslated
list 😐 in order to work around the existing damage.To reproduce the problem, create an XLSForm with this in the
survey
sheet:Create
oblast.csv
with the following contents:Import the XLSForm into KoboToolbox and add
oblast.csv
as a form media file. Deploy, and create a submission. Attempt to export, see the following failure:Internal discussion: https://chat.kobotoolbox.org/#narrow/stream/4-Kobo-Dev/topic/Critical.20export.20failure
The text was updated successfully, but these errors were encountered: