1

Topic: File upload window stuck loading, api or theme

Hi,

I have an installation of tinymce running... it is version 3.4.7
I also have MCImageManager (working just fine)

But version 3.1.0.7 of FileManager gets stuck when opening the popup window... it keeps all the placeholders visible ({#common.directory}, {#filelist.loading}, etc) and never gets any farther.

I used the Google Chrome javascript console to look for any errors and this is what I got:

GET http://www.website.org/admin/cms/tinymce/plugins/filemanager/pages/fm/css/'../img/toolbar.png' 404 (Not Found)
index.html:153GET http://www.website.org/admin/cms/tinymce/plugins/filemanager/pages/fm/css/'../img/navdesc_bg.gif' 404 (Not Found)
index.html:153GET http://www.website.org/admin/cms/tinymce/plugins/filemanager/pages/fm/css/'../img/loading.gif' 404 (Not Found)
index.php:1Uncaught SyntaxError: Unexpected token ILLEGAL
index.php:1Uncaught SyntaxError: Unexpected end of input

After reading around on some other posts (though nobody had this exact error), I tried a few things like turning off gzip, turning off remove whitespace, but nothing has made any difference, I still get the same errors exactly.

In desperation I re-uploaded the entire filemanager folder and re-setup with the same results, error.

What is really strange is that ImageManager works perfectly.

Any ideas are appreciated... btw I know that this is not the "newest" version of IM, but I don't want to upgrade unless you guys are fairly sure that this would fix the problem.

2

Re: File upload window stuck loading, api or theme

"Uncaught SyntaxError: Unexpected token ILLEGAL" this error is normally when an PHP error is written out in a javascript call. So there is likely a PHP error in the response of a javascript call so use Fiddler/Firebug or Chrome dev tools to see that the error might be.

Could be due to missing files or some php setting. Also check the Apache error logs for possible issues.

The 404 issues are something we should address however there won't produce the issue we see here.

Best regards,
Spocke - Main developer of TinyMCE

3

Re: File upload window stuck loading, api or theme

Thanks for the reply spocke..

Chrome dev tools is what I used to get those errors.... I can't find any php areas using Chrome dev tools.

I did take a look at the apache error logs but it only lists the 3 404 errors, nothing else.

4

Re: File upload window stuck loading, api or theme

As far as missing files... I have tinymce on another site server so I installed it there exactly the same, and it works fine.  And as I had mentioned I reuploaded the files onto this server and was still a no-go so I don't think missing files is the problem.

5

Re: File upload window stuck loading, api or theme

I would guess that the index.php file is either the language file, js file or css file. So see if you get any errors if you open them directly.

Like http://yoursite.com/filemanager/js/index.php or http://yoursite.com/filemanager/css/index.php if that still doesn't give you any clue send me an email with an url to your server.

Best regards,
Spocke - Main developer of TinyMCE

6

Re: File upload window stuck loading, api or theme

I tried the direct url and it works, redirects to example.html but clicking on any of the filemanager tests still doesn't load.  I have temporarily turned off session authentication and sent you a private message with test url.

Thanks.

7

Re: File upload window stuck loading, api or theme

I get the same error it's a parse error in the JS file indeed. Could be that the cached js file is corrupt. Try reuploading everything again and remove any cached files in imagemanager/js/_cache

Best regards,
Spocke - Main developer of TinyMCE

8

Re: File upload window stuck loading, api or theme

Hi spocke,

I looked in the filemanager/js/ folder but there was not a _cache directory.  I'm assuming that's what you meant instead of imagemanager/js?   I looked there too out of desperation but that folder is empty.

I wanted to make sure my local copy of filemanager wasn't corrupt so I downloaded the same version from a client who has a working filemanager and uploaded those files instead.  Unfortunately its still exactly the same behaviour.

9

Re: File upload window stuck loading, api or theme

I also tried disabling options like gzip, whitespace, etc again but still no go.

10

Re: File upload window stuck loading, api or theme

Ok, I think I know whats going on now. It seems that the contents gets encoded in when loaded.

I think it has to do with the magic_quotes_runtime setting being enabled. Set that to "off" in your php.ini if possible.

More info here:
http://php.net/manual/en/security.magicquotes.php
http://www.php.net/manual/en/security.m … abling.php

Best regards,
Spocke - Main developer of TinyMCE

11

Re: File upload window stuck loading, api or theme

Hi spocke,

Thanks for the try but that didn't work.

Due to the content management system they use we can't disable magic quotes.  I know its depracated and we are working on fixing their cms but at the moment we can't disable.

Instead, I created an .htaccess file with
php_flag magic_quotes_runtime Off
php_flag magic_quotes_gpc Off

This worked as you can see here:
http://www.denverglc.org/admin/cms/tinymce/info.php

But the file manager still won't load.

I'm curious why this would affect the file manager and not the image manager if this was the case anyway smile

Thanks,
-Kevin

12

Re: File upload window stuck loading, api or theme

Also clear any files in the imagemanager/js/_cache since there will not auto update if only the gpc was changed.

There shouldn't be a difference between them but the problem in the files are \' encoding related and it's normally magic quotes messing up.

Best regards,
Spocke - Main developer of TinyMCE

13

Re: File upload window stuck loading, api or theme

Just wondering if there was a resolution to this issue? I've just upgraded to the latest version of:

* tinmce (3.5b3)
* MC Image Manager (3.1.5)
* MC File Manager (3.1.5)

and I'm seeing the same issue as reported in this thread, i.e. when I try to load filemanager, the filemanager dialog "hangs", spinning on "{#filelist.loading}" with the various other placeholders ({#common.directory}, {#filelist.loading}, etc) at the top of the dialog.

I've tried/checked everything in this thread:

* Clear js/_cache folders
* Set magic_quotes_runtime = Off
* Lanuching directly from the example "index.php" in the filemanager install (same behaviour)

I'm running the following config:

* PHP Version 5.2.9-2
* Windows XP Pro SP3
* IIS 5.1

MC Image Manager is working just fine.

Any help would be much appreciated.

Cheers,
Stuart.

14

Re: File upload window stuck loading, api or theme

Hmm, strange the FM/IM share the same code bases so it should work the same could you mail me a link to your system?

Best regards,
Spocke - Main developer of TinyMCE

15

Re: File upload window stuck loading, api or theme

So the problem is with my localhost development (where I do all my development and testing prior to uploading to my host). I've just uploaded fm out of the box to my host and it is (of course) working fine smile

What I have noticed with my localhost is installing filemanager in the root folder and testing with the following, that it works just fine:

http://localhost/filemanager/examples.html

However if I install filemanager in the location that I have previously had filemanager installed (for versions 3.0.7 and 3.0.1) i.e. within the plugins directory of TINYMCE, it is then that I have the problem:

http://localhost/tinymce/jscripts/tiny_mce/plugins/filemanager/examples.html

I ran with the same folder structures on my host with no problem! Obviously I can't expect you to debug my localhost environment, but it is certainly strange that imagemanager in this case operates just fine, but I'm having this problem with filemanager.

I'll try a few more things on my side, but certainly, if you have any thoughts on this, that would be much appreciated.

FYI, I'm upgrading from 3.0.7 to 3.1.5 to try to get over a problem that I have started having with imagemanager and filemanager since my webhost upgraded my account. When trying to select an image or file, I get an error "Fatal error: Could not resolve WWWROOT path, please set an absolute path in preview.wwwroot config option.", but I'll complete the upgrade of imagemanager and filemanager to see if that resolves that issue before I seek support on that.

Cheers,
Stuart.

16

Re: File upload window stuck loading, api or theme

Hmm, very strange they should work exactly the same unless you have different versions of the IM and FM?

Best regards,
Spocke - Main developer of TinyMCE

17

Re: File upload window stuck loading, api or theme

So, played about with this a bit more and have a workaround. Still no idea why it wasn't working or why this particular workaround works, but when I had filemanager installed in the plugins directory of tinymce with the folder name as "filemanager", I got the "hanging" on loading that I described earlier. If I change the directory name to anything else (I changed it to "filemanagerx"), then it works!!

Bizzare.

18

Re: File upload window stuck loading, api or theme

Sounds like some form of cache issue either a proxy cache or some server/client cache.

Best regards,
Spocke - Main developer of TinyMCE

19

Re: File upload window stuck loading, api or theme

I had the exact same problem with Filemanager v 3.1.3.
The suggestions in this topics didn't help, so I tried to find out where the code stopped...

I alerted a text in filemanager/pages/fm/js/upload.js which showed without problem. And the uploadbox appeared as well! When I removed the alert, the uploadbox still appeared - this fixed my problem completely smile

Not sure what happened there, I guess the files was corrupted in some was and saving it again corrected this?

Hope this helps someone smile

20

Re: File upload window stuck loading, api or theme

Good to know, thanks for reporting it in.

These weird errors seem to pop up every now and then, and almost always has something to do with the server setup, caching (server side accelerators, client side caching) or corrupt files.

Afraithe
TinyMCE Developer
Moxiecode Systems