I found problem with window in edit product page from first magento 2 releases, when you opens Wysiwyg editor many times, then something is going wrong with JavaScript object initialization.
In new Magento 2.1 developers disabled window for wysisbvig, but I see still probem for "Insert Image" button.
Uncaught TypeError: Cannot read property 'closed' of undefined in browser.js 39
And I can't open window for inserting image twice.
Hello Team! It's real priority issue, Wysiwyg does not work correctly on all magento versions.
I can confirm this issue.
Temporary bugfix would be to change the following in lib\web\mage\adminhtml\browser.js
Change
closeDialog: function() {
this.modal.modal('closeModal');
}
to
closeDialog: function() {
this.modal.modal('closeModal');
this.modal = null;
}
But I assume it's not the 'correct' solution to reset the modal parameter on the MediabrowserUtility object so that's why I'm calling this a temp fix :)
@koenner01 , your way is'nt work.
but I've fixed by change (lib\web\mage\adminhtml\browser.js)
if (this.modal) {
this.modal.html($(content).html());
this.modal.modal('option', 'closed', options.closed);
}
to
if (this.modal) {
this.modal.html($(content).html());
this.modal.modal('option', 'closed', true);
}
Getting the same issue here but also when using a custom image uploader/chooser in a widget. The above fix of changing the parameter to true works for me but currently I'm just patching the core in my version
It also looks like this issue was fixed 4 months ago but it's not been released yet:
https://github.com/magento/magento2/commit/04a020a2e1db9f38378473733d65925b18dbdd15
@vkorotun Will the fix for this issue be included in 2.1.3?
Same issue here, please could you fix it.
I can report this issue is still present in CE 2.1.4
@Valentyn-Kubrak, thank you for your report.
The issue is already fixed in develop branch, 2.2.0, 2.1.9
Most helpful comment
It also looks like this issue was fixed 4 months ago but it's not been released yet:
https://github.com/magento/magento2/commit/04a020a2e1db9f38378473733d65925b18dbdd15