Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Errors on Insert Image or Widget in CMS Page editor
 
Frédo
Jr. Member
 
Total Posts:  2
Joined:  2009-11-09
 

After a 1.3.2.3 to 1.4.0.1 upgrade, errors when weI try to insert an Image or a Widget :
Message for Insert Image : “target element not found for content update”.
Message for Insert Image : “el is null”.
We have the same problem with or without TinyMCE.

 
Magento Community Magento Community
Magento Community
Magento Community
 
deepak11
Member
 
Total Posts:  34
Joined:  2010-06-05
 

I have same problem when i upload ,second time,strange is that it works fine first time image upload

Any solution ????????

 
Magento Community Magento Community
Magento Community
Magento Community
 
winterboyusa
Jr. Member
 
Avatar
Total Posts:  12
Joined:  2009-05-20
 

I have the same error.  After upgrading to 1.4 insert image on editor does not work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lakshyami
Member
 
Avatar
Total Posts:  44
Joined:  2010-03-25
Sri Lanka
 
Frédo - 21 April 2010 06:03 AM

After a 1.3.2.3 to 1.4.0.1 upgrade, errors when weI try to insert an Image or a Widget :
Message for Insert Image : “target element not found for content update”.
Message for Insert Image : “el is null”.
We have the same problem with or without TinyMCE.

I also faced to the same problem, check it after logout and loggin. Then it worked for me.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
o-liva
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2010-09-07
spain
 

yep - indeed - after logout-login it works - i did find all the dialog boxes of previous attempts there—void and had to close them
this is obviously no way to keep on going ... i hope somebody can fix this - HELP PLEASE!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jessebryant
Jr. Member
 
Total Posts:  9
Joined:  2011-03-09
 

Was there any known solutions to this, because not even logging out and logging in works for me… I just can’t insert any uploaded images.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jessebryant
Jr. Member
 
Total Posts:  9
Joined:  2011-03-09
 

Ok guys, I couldn’t wait, had to get something done for this demonstration to the office so have come up with a slight hack.  It’s not pretty, but resolved my issue for now:

Open: <magento_root>\js\mage\adminhtml\browser.js

About line 228, look for:

getTargetElement: function() {
        
if (typeof(tinyMCE) != 'undefined' && tinyMCE.get(this.targetElementId)) {
            
if ((opener this.getMediaBrowserOpener())) {
                
return opener.document.getElementById('src') || opener.document.getElementById('href');
            
else {
                
return null;
            
}
        } 
else {
            
return document.getElementById(this.targetElementId);
        
}
    }
,

And change ‘src’ to ‘background_image’ - ta daa!  Hope this helps someone on the path to a more reliable solution because obviously not all fields will have that ID.

Jesse.

 
Magento Community Magento Community
Magento Community
Magento Community
 
xtrshop
Jr. Member
 
Total Posts:  4
Joined:  2011-04-30
 

I’m a newbie with Magento.
I’ve the same problem (el is null ) but the solutions doesn’t work because it’s not the same code (i’m using the latest version of Magento

getTargetElement: function() {
        
if (typeof(tinyMCE) != 'undefined' && tinyMCE.get(this.targetElementId)) {
            
if ((opener this.getMediaBrowserOpener())) {
                
var targetElementId tinyMceEditors.get(this.targetElementId).getMediaBrowserTargetElementId();
                return 
opener.document.getElementById(targetElementId);
            
else {
                
return null;
            
}
        } 
else {
            
return document.getElementById(this.targetElementId);
        
}
    }
,
 
Magento Community Magento Community
Magento Community
Magento Community
 
fkehle
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2011-04-07
 

Hi guys,

any workaround here for this problem?

Thanks Fabian

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crossline
Jr. Member
 
Total Posts:  2
Joined:  2011-05-02
 

The solution of danieln solved the problem. Don’t forget to logout and login again, otherwise it won’t work (at least, in my case, magento 1.5.1.0).

 
Magento Community Magento Community
Magento Community
Magento Community
 
makotokoganicom
Jr. Member
 
Total Posts:  26
Joined:  2009-11-16
 

This did’nt solve my problem.

Change line 202 to:
‘onclick’ => “widgetTools.openDialog(’” . $this->getConfig(’widget_window_url’) . “widget_target_id/”

I use Magento 1.5.1.0. Is there other solution?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mukunig
Jr. Member
 
Total Posts:  7
Joined:  2010-02-11
 
Crossline - 10 May 2011 10:09 PM

The solution of danieln solved the problem. Don’t forget to logout and login again, otherwise it won’t work (at least, in my case, magento 1.5.1.0).

Worked for me too in 1.5.1.0. Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
fkehle
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2011-04-07
 

Hi thanks for the solutions,

but both hints didn\’t work for me. Are there other solutions?
If I ad the \"/\" then I get this problem:

Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]

Thanks for any help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
arunda2
Jr. Member
 
Total Posts:  1
Joined:  2009-07-17
 
danieln - 03 May 2011 03:39 AM

For me, this issue arised when going from 1.5.0.1 to 1.5.1.0.

A quick fix in lib/Varien/Data/Form/Element/Editor.php solved the problem. Looks like someone at Varien forgot the slash after some refactoring.

Change line 202 to:

'onclick'   => "widgetTools.openDialog('" $this->getConfig('widget_window_url') . "widget_target_id/"

best regards,
daniel

It worked for me in 1.5.1.0
After flush magento caches.. and logout-login

But it is buggy. I continue having 2 dialog boxes overlapping and i can not view the existing subfolders into media/

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
hartleigh
Jr. Member
 
Total Posts:  1
Joined:  2011-07-30
 

daniel’s fix worked for me, thanks a bunch \o/

btw… i am using v1.5.1.0 out of the box, first time user. you would think that this would have been resolved pretty quickly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
web.93ft
Jr. Member
 
Total Posts:  8
Joined:  2010-04-23
 

tried this still get the error message, emptied cache and logged out logged in…

frustrating!!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2