fix: handle big-image as valid media type to prevent translation mismatches in exports#336
Merged
rajpatel24 merged 2 commits intomainfrom Nov 24, 2025
Conversation
87d5a1c to
6abda2d
Compare
big-image as valid media type to prevent translation mismatches in exports
9 tasks
rajpatel24
added a commit
to kobotoolbox/kpi
that referenced
this pull request
Nov 24, 2025
…V-1172 (#6476) ### 📣 Summary Update KPI to use the latest Formpack release, which adds support for `big-image` as a valid media type in export workflow. ### 📖 Description This PR updates the formpack dependency hash in `requirements.in`, `requirements.txt`, and `dev_requirements.txt` to use the commit from [formpack#336](kobotoolbox/formpack#336). That PR introduces support for `big-image` as a valid media type to prevent translation mismatches in exports.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the export error
Mismatched labels and translations: [label] [None, big-image] 1!=2which occurred when a form contained abig-imagecolumn.Description
Previously, forms containing a
big-imagecolumn failed during data export with the errorMismatched labels and translations: [some-label] [None, big-image] 1!=2.This happened because
pyxformdefines the aliasbig-image → media::big-image, but ourexpand_contentlogic only recognized audio, image, and video as valid media types. As a result,big-imagewas not treated as a media field and was incorrectly appended to thetranslationsarray, leading to inconsistent translation counts andTranslationErrorexceptions during FormPack build or export.This fix adds
big-imageto theMEDIA_COLUMN_NAMESconstant and ensuresexpand_contentdynamically references that list when parsing media columns. With this change,big-imageis correctly handled as a valid media type and is no longer added to the translations array preventing mismatched translation errors in exports.Steps to Reproduce
TranslationError: Mismatched labels and translations: [label] [None, big-image] 1!=2.