Hello everyone,

I am currently experiencing some issues around the IMCE user interface:
I have installed the latest available version of tinymce and IMCE and linked them together via my template.php code:

<?php
function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) 
{
	static $access, $integrated;
	$init['theme'] = 'advanced';
	$init['theme_advanced_buttons1']= 'save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect';
	$init['theme_advanced_buttons2']= 'cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor';
	$init['theme_advanced_buttons3']= 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen';
	$init['theme_advanced_buttons4']= 'insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage';
		
	if (!isset($access)) 
	{
		$access = function_exists('imce_access') && imce_access();
	}
	
	$init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);
	
	if ($init && $access) 
	{
		$init['file_browser_callback'] = 'imceImageBrowser';
		if (!isset($integrated)) 
		{
			$integrated = TRUE;
			drupal_add_js("function imceImageBrowser(fid, url, type, win) {win.open(Drupal.settings.basePath +'?q=imce&app=TinyMCE|url@'+ fid, '', 'width=760,height=560,resizable=1');}", 'inline');
		}
	}
	return $init;
}
?>

the button that links to the IMCE interface is shown in tinymce. However, as soon as I open the IMCE GUI, it only shows some files, yet no "upload file" button or whatsoever. Could anyone help me here? Did I do something wrong?

kind regards,

Jeroen

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GiorgosK’s picture

where did you get this function from ?
I don't think init['theme'] = belong in here

you should try the developer's suggestion http://drupal.org/node/241753#comment-792305
with a BASE theme make sure that all is working fine (clean cache might be needed)

and then add any additional code into phptemplate_tinymce_theme

a different issue that talks about it is here http://drupal.org/node/260217

ufku’s picture

orchard’s picture

Im using drupal 6.14

I orginally had the upload, thumbnails, delete, resize, send to fckeditor menu showing in the file browser, but it disappeared!

I found out that when i was using the jquery.tools.min.js from the jquery site, it was conflicting with my imce file browser.
I removed the jquery.tools.min.js script, and imce file browser worked fine!

ryanmargheriti’s picture

anythign further on this? I am having the same issue.. the upload button does not appear, nor do the buttons next to it (cannot remember what they are at the moment). It is only the 'help' button on the left.

cwaxwing’s picture

I had the same problem. I was using a theme with a scripts folder containing jquery.js. That file was unnecessary as there's one in Drupal's "misc" folder already. I deleted my jquery.js file (leaving the one in the "misc" folder) and not only do my jquery function calls still work, but the buttons for IMCE show up as well. Hope this helps.

seanhellwig’s picture

Issue tags: +imce, +popup, +simplemenu
FileSize
21.27 KB

Hello everybody.. i was going crazy trying to figure out why the IMCE popup window was not displaying the upload image link / button..

I'm using a custom theme with FCKEditor as my WYSIWG

Modules:
cck-6.x-3.x-dev

IMCE Image
ImageCache
ImageCache UI
IMCE
IMCE Mkdir
IMCE Wysiwyg API bridge

ISSUE and My Solution
There seems to be a js conflict with simplemenu and IMCE window. so to resolve the conflict:

Site configuration -> Simplemenu

open up the advanced settings and make sure the "detect pop-up windows" checkbox is CHECKED.

And it now works perfectly!

Hope this helps somebody

WeRockYourWeb.com’s picture

Checking the "Detect pop-ups" in SimpleMenu settings did it for me Sean :) thanks!!

Foonaka’s picture

Comment #5 fixed it for me!

bluefoot’s picture

I dont have this module simple menu. My theme is garland and my button disappeared as well. any help?

mpotter’s picture

I am having this problem when using the latest version of "Nice Menus". Could somebody explain what the checkbox in Simple Menus actually does? If Nice Menus is enabled, the Download and other buttons at the top of IMCE disappear. If I disable Nice Menus, then the buttons appear as normal. Any help on tracking down this conflict would be appreciated.

Edited (FIXED): Going into the Nice Menus configuration and turning off "Use Javascript" option fixes this problem. Apparently there is a conflict between the javascript used in IMCE to display the toolbar at the top and the Superfish javascript library used by that latest Nice Menus. It's possible the 1.x version of Nice Menus doesn't have this problem since it doesn't use Superfish.

litmusdesigns’s picture

I found that the "Open Form Help Links In New Window" module caused the buttons in IMCE to disappear.

aviddv1’s picture

In my case Shadowbox 6.x-4.2 caused the problem.

marianoog’s picture

Also Shadowbox 6.x-4.2 caused the problem.

criscom’s picture

In my case #10 solved the issue. when i disable Use JavaScript in the Nice menus configuration (in Drupal 7) the upload links keep reappearing. I have to test Nice Menus now in IE since Superfish JS needs to be activated for Nice menus to work in Internet Explorer.

UPDATE: tested it in IE 7 and IE 8 - nice menus also work with Use JavaScript disabled.

treehacker’s picture

Version: 6.x-1.1 » 6.x-2.x-dev
Status: Closed (duplicate) » Needs work

There is another conflict between Slideshow Creator 6.x-1.36 and IMCE 6.x-2.x-dev with the same result that there are no upload buttons showing up.
I didn't find a solution on this still. Maybe somebody who has more skills can check this out.

treehacker’s picture

Status: Needs work » Fixed

It has been solved using the latest version of Slideshow Creator, v.1.38

genemachine’s picture

I just had this same problem, and comment #10 clued me into a solution; I had DHTML menus enables. As soon as they were disabled, the IMCE browser buttons reappeared!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

johnTEN’s picture

Status: Closed (fixed) » Active

I am having the same problem and none of the above fixes word

johnTEN’s picture

To expand on my problem. I had ckeditor/IMCE for years with no problem, using the same theme. After a recent round of updates the IMCE upload button disappeared. I tried all the fixes above and no luck. So I got rid of ckeditor, and went with WYSIWYG/IMCE/bridge and have exactly the same problem. And a new problem, in that instead of the html it is inserting everything in an [img] tag

Störtebeker’s picture

Go to: admin/settings/wysiwyg/profile/2/edit -> "Buttons and plugins"

disable the checkbox for BBCode for TinyMCE (this caused the [img] instead of HTML code for me).

my buttons disappeared as well when I updated several modules lately. I dunno which might be causing this issues with IMCE not showing any buttons anymore, images are not chosen when clicking on the file name in the file browser list and nothing can be inserted in TiynMCE anymore :-(

generalconsensus’s picture

I have a fresh Drupal 6 install including IMCE, IMCE Wysiwyg bridge, and WYSIWYG -- the button does not appear, no error log nothing. Hoping that we can find an answer

Störtebeker’s picture

In my case it was Drupal for Facebook, after I disabled this module the IMCE file upload worked again

theoracleprodigy’s picture

The fix on #10 works for me. Its a conflict between nice menu and imce.

ytsurk’s picture

in my case it was a custom JS error ..,
disturbing IMCE due drupal file aggregation.

FB for drupal is still installed, and throws an error on the IMCE upload pop-up !

allan1015’s picture

I had Drupal Facebook throwing a Javascript error - that prevented IMCE form putting up the buttons

I found this out by going to /imce (mysite.org/imce) and noticed the JS error in the status bar. On the normal IMCE pop up there is no status bar.

Anyway, I removed FB and IMCE worked,
I upgraded FB to the latest (6.x-3.2-rc3) the error went away

So, it seems a good test to use /imce and see if there are any javascript errors beijng thrown

DeNelo’s picture

I don't know what module is conflicting, but I have the same problem. I'm not using any of the conflicting modules mentioned above.
Using CKEditor, there is no File upload button when I want to insert an image in the text.

ytsurk’s picture

check your javascript console for errors ...

DeNelo’s picture

Only error when creating a new node is:
Failed to load resource: the server responded with a status of 404 (Not Found). The file not found is the color.css file, and the path it's looking is /public://color/excitordrupal-ddff50ff/colors.css?l
-a path which I find a bit strange, but I guess I'll have to find the answer to that one in Color.
Other than that I get no errors at all.
This seems to be quite a widespread problem...

ytsurk’s picture

so no error, fe. in FF under Tools > Web Developer > Error Console ?

DeNelo’s picture

Well, the Google Chrome Javascript Console says
event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.
Don't think that's it though... Otherwise it's blank.

smorrish’s picture

Same problem with NiceMenus in Drupal 7.14 but none of the above fixes, including #10, solved the problem. Couldn't find the module that was conflicting but a simple work around was to isolate the IMCE menu element in CSS (#ops-list) and add a top margin of say 30px.

NancyDru’s picture

Drupal 6.26, WYSIWYG 6.x-2.4, IMCE Wysiwyg API bridge 6.x-1.1, CKEditor 3.6.3.7474

Nice Menus 6.x-2.1 with the JS option not selected.
No FB.
No Simplemenu.

I rarely use editors myself, so would someone post a picture of what it is supposed to look like, please?

den33775’s picture

For me it was DHTML Menu, expand on bullet option. Thanks for those pointing me to javascript menu relationship - got all my buttons back! :o)

norwegian.blue’s picture

Version: 6.x-2.x-dev » 7.x-1.5

This all worked for me on initially installing it.
Then, with no changes on my part, I had no buttons visible on the IMCE browser, and couldn't preview images.
Turned out to be some conflict with Drupal for Facebook module. Dev version of fb module fixed it for me.

sunchaser’s picture

All I can say is: use your Script console (in Firebug) to see if the popup throws any errors ... it did in my case and pointed me in the right direction

rsvelko’s picture

here is how I fixed it:
- my problem was that after u press the tinymce add image icon, the image popup did not have a imce button next to the url field... the imce icon/button was missing / disappeared in google chrome...

- solution found via:
- launch that popup and press F12 for the developer tools aka firebug-like tool for chrome... - got that error:
- Uncaught TypeError: Property 'focus' of object [object DOMWindow] is not a function ...

- a google search pointed me to a forum where the reason turned out to be a chrome extension called better popups blocker... other forums cited Adblock plus...

- after disabling the popup blocker - chrome worked fine.

In some other cases some JS module can be the reason - as in the posts above...

Cheers...

mallin’s picture

If anyone was interested in the future, i had the same problem and google pointed me to this issue. #37 was helpful, it turned out thad my AdBlock in Chrome was the cause. I added my drupal site to whitelist and i got my button back.

mollybee’s picture

Fyi, I had this problem and the conflict was with the FitVids module.

deggertsen’s picture

vaccinemedia’s picture

I can second that Fitvids stops the buttons from appearing.

SamSteinig’s picture

Me too. Fitvids killed it, so I killed Fitvids ;)

skrobe’s picture

had same problem with DHTML expand on bullet option.
the reason was, that it tried to replace attribute that does not exist.

what i did is:
in dhtml_menu.js about line 180 i commented two lines as shown below

if (settings.nav == 'bullet' && !rtl) {
      // Shift overlay to the left by the width of the icon and the distance between icon and text.
      //var shift = '-' + (Math.ceil(($('.menu li').css('margin-left').replace('px', ''))) + 16) + 'px';
      // Shift the overlay using a negative left-hand offset, and the text using a negative right-hand margin.
      //$('.dhtml-menu-icon').css('left', shift).css('margin-right', shift);
}

and in css added

.dhtml-menu-icon {
	margin-right:-16px;
}

hope this helps

colorsand’s picture

I have the same problem, the button came back when i closed the Theme developer module .

Sigvard’s picture

I have had the same issue and for me it was caused by IMCE.js interfering with the select2 and modernizr javascript libraries.

For some reason these functions are called without the jQuery libraries being available so functions are missing which prevent the Upload button from being created.

To solve similar issues you can do the following:

Run firebug (or equivalent debuger) and try to upload a file/image.
When looking at the popup window with the missing upload button open the script tab (reload page if nothing happens).
The debugger will stop each time a javascript fail (hit play to see the next one).

Look at the failing scripts and add checks to them to make sure that the scripts only call functions that actually exist (example code here).

An example:

jQuery('select').select2();

Fails because select2 is not a function within the scope of the imce.js file.

But replacing it with

if('select2' in selector){
      selector.select2();
}

prevents it from being called by accident in imce.js but still allow your other javascript files to run it. With other modules this require some patching but I was lucky enough to have the issue in a theme fail specific to my site.

thalles’s picture

Leave me know if this issue was solved.

thalles’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.