Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.3.0
-
None
Description
In design/standard/javascript/ezoe/popup_utils.js there's this code:
if ( n.image_attributes && n.data_map[ n.image_attributes[0] ] && n.data_map[ n.image_attributes[0] ].content['small'] ) { tag = document.createElement("span"); tag.className = 'image_preview'; tag.innerHTML += ' <a href="#">' + ed.getLang('preview.preview_desc') + '<img src="' + ed.settings.ez_root_url + n.data_map[ n.image_$ td.appendChild( tag ); hasImage = true; }
So only the the first image attribute is checked and if it's empty hasImage is not set to true.
Therefore if we have a image class that has for example two image attributes:
- thumb
- image
an we have an object of this class which has image uploaded in the image attribute and the thumb is empty, this object cannot be embed in OE as image.
The code should be changed so that it searches all the image attributes until it finds one that is not empty.
Steps to reproduce
- add an image attribute to the image class
- create an object of the image where only the second image atribute has an image uploaded
- try to embed that object into OE as image