Bug in MetaWizard widget
pgerundt opened this issue · 1 comments
Steps to reproduce:
- Add a new language
- Enter data
- Save
When deleting the recently added language, a JS error is thrown.
Cause: The metaDelete()
method in core.js tries to re-enable the language in the select field:
core-bundle/src/Resources/public/core.js
Line 2329 in df6731c
But the select field does not contain (disabled) language options of currently used languages.
Maybe the language should not be removed from the select field:
But instead the active languages should be added with the "disabled" attribute to the select:
Maybe something like this (totally untested):
$options[] = '<option value="' . $k . '"' . ($this->varValue[$k] ? ' disabled="disabled"' : '') . '>' . $v . '</option>';
and removing the unset()
Moved to contao/contao