JS error: wgFlexFormSecure is not defined
This issue was reported on the Discord community, but also happened on some WS wikis under different circumstances (see internal note).
The issue reported on Discord:
It happened with a file upload form:
<form enctype="multipart/form-data" >
<input type="file" id="file-upload" name="test" target="FF upload test" />
<input type="submit" value="upload" />
</form>
For some reason, sometimes when refreshing the page, the white area on the page that holds the filename does not appear, and i get the following error in the console:
FlexForm.general.js:751 Uncaught (in promise) ReferenceError: wgFlexFormSecure is not defined at fetchAllDecrypt (FlexForm.general.js:751:2) at FlexForm.general.js:1208:9
Those times, the upload fails silently. No errors or notifications of any kind. The file page is not created or anything. Other times when that error doesn't show, i was able to upload files. Both JPG and PDF. Any clues why that error shows sometimes? We do have the following setting set in LocalSettings.php:
$wgFlexFormConfig['secure'] = true; we're running v2.2.14 REL1_39 on MW 1.39.7.
Edited by Liselot Roelen