From 4f63edf25efb888d43817d2803b3ba9053442c66 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 24 Jun 2022 09:31:44 -0400 Subject: [PATCH] Fix issue processwire/processwire-issues#1575 --- wire/modules/Inputfield/InputfieldFile/InputfieldFile.module | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wire/modules/Inputfield/InputfieldFile/InputfieldFile.module b/wire/modules/Inputfield/InputfieldFile/InputfieldFile.module index ee24f4b3..0cff175f 100644 --- a/wire/modules/Inputfield/InputfieldFile/InputfieldFile.module +++ b/wire/modules/Inputfield/InputfieldFile/InputfieldFile.module @@ -1377,7 +1377,10 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel $f->set("value$language->id", $v); } } else if($f instanceof InputfieldCheckbox) { - if($value) $f->attr('checked', 'checked'); + if($value) $f->attr('checked', 'checked'); + } else if($f instanceof InputfieldText && is_array($value) && isset($value['data'])) { + // a previously multi-language value that's now a single-language value + $f->val($value['data']); } else { $f->val($value); }