benetech / Imageshare

MIT License
0 stars 0 forks source link

We allow for "languages" to be empty but we get an error if we don't include one #249

Closed clapierre closed 3 years ago

clapierre commented 4 years ago

If the file_language is left blank we allow this as one of the options during import

Languages Accept empty value

However we get this error message when we try to import a resource with a file with an empty language field.

(Resource Name) Term was not found in taxonomy languages

clapierre commented 4 years ago

Imageshare-Covid.json.txt After talking with @sinabahram, I tried what you suggested Sina and changed "en" to a null entry and tried to import the same JSON script and got the same weird error.

(Covid-19 Model) Term was not found in taxonomy languages

Attached is the JSON file with extension .txt for Wordpress

Try to import that JSON file and you will get that error. Go into the JSON file and change

and change "languages": [ "" ],

to "languages": [ "en" ],

The file can then be imported.

jkva commented 3 years ago

Fixed in d1ecabf76651b34197d90f75501de0be23336eee. It's a bit strange since this means effectively a resource file can have "no language", but it's now supported. Keep in mind that "all" for "All Languages" also exists.