Hi there,
I'm trying to set-up IMCE with tinymce and I'm having some problems. I'm using Drupal 5 and the pathed tinimce module (4.7.x-1.x-to-5).

1) tinymce is working fine.

2) Looking at the demo here: http://www.ufku.com/drupal/imce/demo I should have an image button, which should call this javascript: javascript:tinyMCE.execInstanceCommand('mce_editor_0','mceImage',true);

As a nice start, I do not have such button, neither looks like I can have such button in the tinymce drupal configuration. I do have an advanced image button, and anyway if I call the javascript for the normal image it would open the image window.

3) Neither the image or advanced image window have a browse button. They are just the normal, standard windows.

4) The IMCE module is installed and if I browse to imce/browse I can see my images. I just don't have the button in tinymce.

Any suggestions?

Thanks in advance,
Andres

Comments

andres@baravalle.it’s picture

Hi,
if someone has the same problem, test the system with one of the default themes. My theme did not have this line:

print $closure

and that's what was causing the problem. It took me looooong time to find the problem...

Also, be patient because you won't have the special button for loading images untill the JavaScript at the end of the page is loaded.

Andres

dustymugs’s picture

I had the same problem with a custom theme and that fixed it.

stephtek’s picture

I am having the same problem with a custom theme in Drupal 4.7. I already had the closure tag, and it still isnt working?

webservant’s picture

Ok, I've been all over the internet and drupal forums to find the fix for this one. I've checked all my themes to be sure they have the closure tags, they already had them, but still now IMCE browse button. I even dumped the database twice to see if it was just the order in which I was enabling the various modules that made a diference, and still no browse button. What actually enabled the browse button for me was making a change to visibility settings for TinyMCE.
I had all but given up on getting a browse button. I wanted TinyMCE to be available when editing blocks so I went to the site settings, then to TinyMCE settings. Under visibility, I added the line "admin/build/block/configure/block/*" I hit save, and when I went to edit the block, I noticed I had a browse button. I quickly checked the pages to see if the button was there, and sure enough it was. So, I'm assuming that just by adding to the visibility settings, it forced a reload of the code that produces the browse button.

I hope that helps someone else too.
Cheers!
PS: I'm using Drupal 5.1 with the latest release of TinyMCE and IMCE.

davidjmcq’s picture

I've got the exact same problem. I've tried your trick but it didn't work. The basic configuration for tinymce doesn't offer a browse option (ie: Home › Administer › Site configuration > tinymce > edit > buttons and plugins)

If anyone can suggest what I've done wrong I would be eternally grateful. The main reason for installing tinymce was to be able to insert pictures.

visionmark’s picture

Any luck? I am having the same problem.

SteveK’s picture

kaplan1’s picture

Sorry for the rookie question, but where do I insert this line of code?

rosgar’s picture

and look for

page.tpl.php

and add this before the end of the body tag...

print $closure


McCool’s picture

Same problem, same solution!
Thanks for that!

hackmac27’s picture

Problem is solved for me, but can't really explain why. Try refreshing IMCE with the RC2. BTW I'm using IMCE with FCKeditor. It simply just didn't work with TinyMCE.

sheffy_llama’s picture

I was missing $closure - your comment saved me hours of trying to figure it out, many thanks :)

rosgar’s picture

Missing php code! Lol, it took me days just to find this culprit and I thought I messed up my configurations.

davidkyte’s picture

closure worked great ;-)

Thankyou very much

tk5ep’s picture

Hi all,

I use a standard theme and i checked in the tpl file. The needed code is there but i'm still unable to display the browse button in tinymce !!

Any other idea ?

Thanks

oceancomputers’s picture

after adding the code, it works in firefox, but not IE.

Any more suggestions?

hackmac27’s picture

I use Drupal 6.1 with appropriate TinyMCA and brand new IMCE. I've tried everything mentioned above, but it's still not working. The code is in my theme, adding the line to the TinyMCA didn't help either. I've even tried to use both with Image and Advanced Image functions. What could have gone wrong?

Aleasenir’s picture

SAme problem.

datawench’s picture

i am having the exact same problem.
i'm using drupal 5, with tinymce 3.0.4 installed and working fine, and imce 5.1.2 supposedly installed and enabled.

selecting the "image" button in tinymce brings up a dialog that allows me to type in a URL to an image, but with no browse button... even though every single demo i've seen just about everywhere has that button.

the admin is using the garland theme, which has the "print closure" line where it belongs.

still no love.

datawench’s picture

while tinkering with this problem i turned image assist off and then on again... and now the browse button shows up.

curioser and curioser.

bcooper’s picture

In case anyone makes a bonehead move like I did... check your TinyMCE version... I had 3.0x installed... deleted it and uploaded 2.01 and voila... browse button!

Hope that helps!

virtuose’s picture

hi BCooper

i resolve the same problem adding this code


print $head_title
print $head
print $styles
print $scripts

/* Needed to avoid Flash of Unstyle Content in IE */ var imceBrowserURL = "/imce/browse";

if don't forget this close code at end

print $closure

but i have the same probleme with version 6. you have resolve your probleme. lets me say thank

subhacom’s picture

I am having the same problem with Drupal 6.2 , imce-6.x-1.0, tinymce_3_1_0_1 and tinymce-6.x-1.1-dev. I am using the default theme garland in which the closure code is already there.

subhacom’s picture

I should have looked into the README file of IMCE first. Which gives a pointer to the issue: http://drupal.org/node/241753#comment-792305.

That solved it!

peter_halada’s picture

Hi, are you using drupal 6 ?

danbryant’s picture

Adding: <?php echo $closure; ?> fixed it. Much appreciated!

Liembo-1’s picture

I had earlier resolved the jQuery/prototype conflict by eliminating jQuery's use of $() (giving it to prototype instead) (see http://drupal.org/node/100842 and http://awebfactory.com.ar/node/189). IMCE's javascript files were using that notation as well so they needed updating as well.

keyone’s picture

I was having this problem too. Using Drupal 5.14, FCKEditor 5.x-2.2, 5.x-1.2

I had been using FCKEditor to default to not enabled, so you had to click a pop up link to get to the WYSIWYG editor. When I changed to that to default enabled, so no need to pop up link to get Rich Editor, I now get the Browse button in the Image editor. Weird. I can live with that, I guess.

subadmin’s picture

Hi
i have same problem but not fixed yet, i checked the theme page.tpl file here is also have code
print $closure;
which you guys said to add into the page.tpl file
please tell me if you have any solution
regards
Rana Awais
www.ranaitsolution.com

phofab’s picture

This seems to be an ongoing problem. Here is my solution after many days.It had to be in permissions somewhere, but where was the problem. It was working well for me prior to me substituting the code in template.php to allow viewers to comment on an Article page.Comment 28 - https://drupal.org/node/1183598#comment-7586313

Modules/Media/IMCE/Configure/Role-Profile assignments/administrator – Select User-1/ Save
Some Tutorials
http://www.ostraining.com/blog/drupal/imce-for-drupal-7-integration-with...

http://drupal.cocomore.com/blog/configuring-and-adding-images-drupal-7-c...

Hope it works for others as it seems to devour a heap of time.