PHP errors when browsing for image TinyMCE

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
handcoded
Forum Members
Forum Members
Posts: 123
Joined: Thu Dec 06, 2007 2:26 pm

PHP errors when browsing for image TinyMCE

Post by handcoded »

Hi

I have upgraded an old install to version 1.12.1 "Rontiki" and after finally getting TinyMCE to work by changing the settings for the module so that it uses a static config file I have run into another issue.

When editing a page and browsing for an image this error appears and I don't know how to fix it.

Warning: Creating default object from empty value in /home/******/public_html/modules/TinyMCE/filepicker.php on line 14

Fatal error: Call to undefined method stdClass::GetPreference() in /home/******/public_html/modules/TinyMCE/filepicker.php on line 15

The code looks like this:

Code: Select all

$CMS_ADMIN_PAGE=1;
$path = dirname(dirname(dirname(__FILE__)));
require_once($path . DIRECTORY_SEPARATOR . 'include.php');
$urlext = get_secure_param();

check_login();
$userid = get_userid();

$config=&$gCms->GetConfig();

$modules =&$gCms->modules;
$tiny=$modules["TinyMCE"]['object'];
$tiny->curlang=get_preference($userid, 'default_cms_language');
$filepickerstyle=$tiny->GetPreference("filepickerstyle","both");
$tiny->smarty->assign("filepickerstyle",$filepickerstyle);

$tiny->smarty->assign("rooturl",$config["root_url"]);
$tiny->smarty->assign("admindir",$config["admin_dir"]);
$tiny->smarty->assign("filepickertitle",$tiny->Lang("filepickertitle"));
$tiny->smarty->assign("youareintext",$tiny->Lang("youareintext"));
Some assistance would certainly be appreciated.
User avatar
PinkElephant
Forum Members
Forum Members
Posts: 169
Joined: Fri Feb 06, 2009 2:08 pm

Re: PHP errors when browsing for image TinyMCE

Post by PinkElephant »

Hi
handcoded wrote:modules/TinyMCE/filepicker.php on line 14
Looking briefly at 1.x I'm guessing that your version of TinyMCE is out-of-date or out-of-whack. I'd try a fresh install with vanilla TinyMCE (better still, CMSms 2.x).
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm
Location: MI

Re: PHP errors when browsing for image TinyMCE

Post by Jeff »

Which version of TinyMCE?

My guess is you are using the latest version which is for 2.x not 1.x.
handcoded
Forum Members
Forum Members
Posts: 123
Joined: Thu Dec 06, 2007 2:26 pm

Re: PHP errors when browsing for image TinyMCE

Post by handcoded »

Hi

Was version 2.something but have upgraded it to a later version 2 and it is now working fine.
Locked

Return to “Modules/Add-Ons”