CMS MADE SIMPLE FORGE

TinyMCE

 

[#7145] CMSMS 1.10.1 - Filepicker not working in non-static config

avatar
Created By: Mathieu Muths (airelibre) (airelibre)
Date Submitted: Thu Nov 10 07:07:00 -0500 2011

Assigned To:
Version: 2.9.4
CMSMS Version: 1.10
Severity: Critical
Resolution: Fixed
State: Closed
Summary:
CMSMS 1.10.1 - Filepicker not working in non-static config
Detailed Description:
Hi,

When I'm using TinyMCE with a non static config (static config doesn't sometimes
show the editor...), the FilePicker doesn't work.

I found a trick that worked for me - There is maybe a problem in the
GenerateConfig function (module file),  line 781 (CreateLink function) which
returns :

http://test2.airelibre.fr/admin/moduleinterface.php?mact=TinyMCE,,filepicker,0&_sx_=9bffb95f

There is no "id" (double commas) in that url - In the static config, the url is
:
http://test2.airelibre.fr/admin/moduleinterface.php?mact=TinyMCE,m1_,filepicker,0&_sx_=9bffb95f

With ",m1_"

So I tried to change in the tinyconfig.tpl, line 137 :
{$filepickerurl}
by :
{$filepickerurl|replace:',,':',m1_,'}

And the filepicker now works !

Maybe this can help you to solve the problem ?



History

Comments
avatar
Date: 2011-11-21 10:41
Posted By: Simon Brown (uptoeleven)

This has just come in for me after upgrading to CMSMS 1.10.1 - I tried rolling
back to TinyMCE 2.9.1 but it also won't work with CMSMS 1.10.1
      
avatar
Date: 2011-11-21 10:42
Posted By: Mathieu Muths (airelibre) (airelibre)

And did the trick (replace) work for you ?
      
avatar
Date: 2011-11-21 21:17
Posted By: Eva Pettifor (Kulsha)

I tried this morning, and it does not work for me. Once you make the change you
suggested, the file picker is just an empty white square...
      
avatar
Date: 2011-11-22 01:44
Posted By: Mathieu Muths (airelibre) (airelibre)

Ok thank you... Maybe someone of the development team could help ?
      
avatar
Date: 2011-11-23 07:05
Posted By: Paul Peree (musicscore)

Same problem here. This is a major problem as TinyMCE is the only real
(complete) editor left for CMSMadeSimple. Microtiny is only a half editor. You
even cann't change fontsize and color.
      
avatar
Date: 2011-11-23 08:46
Posted By: Mathieu Muths (airelibre) (airelibre)

I made an error in my correction. Try :

{$filepickerurl|replace:',,':',m1_,'}

I forget a comma
      
avatar
Date: 2011-12-17 01:53
Posted By: Lukas Blatter (nockenfell)

Works for me. Thanks
      
avatar
Date: 2011-12-19 06:58
Posted By: Sam (sam159)

Can be fixed by changing line 781 of TinyMCE.module.php from:
$fpurl=$this->CreateLink($id,"filepicker",$returnid,"",array(),"",true);
To:
$fpurl=$this->CreateLink('mfp_',"filepicker",$returnid,"",array(),"",true);

That solves the empty id problem
      
avatar
Date: 2012-01-10 05:05
Posted By: Tristan (tristan)

What's the reason this wasn't fixed in 2.9.5? Thanks for the fix by the way Sam!
      
avatar
Date: 2012-01-18 20:34
Posted By: Dan (darupe)

Another fix is to add the following after line 67 in action.filepicker.php:

elseif (isset($_GET['subdir'])) $subdir = trim($_GET['subdir']);

This approach seems to be used a lot in that file but for some reason, it wasn't
used for the subdir parameter. I do agree that the real cause is due to the
missing ID but I just wanted to share yet another solution.
      
avatar
Date: 2012-01-31 14:37
Posted By: Roman Hanajík (roman)

For me, better is in modules/TinyMCE/TinyMCE.module.php before l. 783 (
$this->smarty->assign("filepickerurl", $fpurl); )
add:
	$fpurl=str_replace("subdir","m1_subdir",$fpurl);
	$fpurl=str_replace("type","m1_type",$fpurl);
	$fpurl=str_replace(",,",",m1_,",$fpurl);
      
avatar
Date: 2012-01-31 20:35
Posted By: Tapio Löytty (Stikki)

Thank's for your concern.

We are not gona stop support for TinyMCE module, even tho it's not core mondule
anymore.

This issue has been fixed in release 2.9.6

We have been just abit too busy lately to look into it.

Closing this topic now, thanks for reporting and fix suggestions, if problem
still occurs, open new BR

Best regards

-Stikki-
      
Updates

Updated: 2012-01-31 20:36
resolution_id: 5 => 7
state: Open => Closed

Updated: 2011-11-23 08:41
description: Hi, When I'm using TinyMCE with a non static config (static config doesn't sometimes show the editor...), the FilePicker doesn't work. I found a trick that worked for me - There is maybe a problem in the GenerateConfig function (module file), line => Hi, When I'm using TinyMCE with a non static config (static config doesn't sometimes show the editor...), the FilePicker doesn't work. I found a trick that worked for me - There is maybe a problem in the GenerateConfig function (module file), line
resolution_id: => 5