Setting media/skin urls to another domain breaks image uploader in wysiwyg editor
-
16-10-2019 - |
Pergunta
If I set the "Base skin URL" and " Base media URL" to a domain other than the one used for the "Base URL" the image uploader in the WYSIWYG editor breaks.
The "Media storage" popup appears and I can select an image using the "Browse files..." button but any file I select isn't shown in the list and the " Upload files" button does nothing what so ever.
I already checked the JavaScript console and the access/error logs of my server but nothing seems to happen at all.
How can I fix this? Or is this a 'feature' and do I have to disable my custom/cdn URL settings just to be able to upload a new image?
Solução
To use a separate domain, you need to take advantage of Store Views. In System > Configuration, the select box in the upper right-hand corner defaults is where you select what Store View you are configuring. The default is Default Config
, which is applied to all store views and the admin (provided that the specific store view does not override the more general/global setting).
Therefore, if you set the Base media url
here, that change will be applied to admin AND your store views. I would recommend selecting your store view and making the change there, as that will have no effect on the admin scope and thus it should not break the WYSIWYG editor.