[bridged] tinyMCE e...
 
Notifications
Clear all

[bridged] tinyMCE error- tinyMCE not initializing correctly

5 Posts
3 Users
0 Reactions
1,503 Views
(@chelle)
Posts: 122
Estimable Member
Topic starter
 

Sorry if this is long, I was having problems and while typing out what I have tried to fix it I'd think of something else to try to troubleshoot, so I detailed those attempts. >.<  So in summary, what I found was when efic is bridged with SMF, the language variable in the tinyMCE init in the header is set to 'english' and not 'en'  I haven't figured out where it's pulling 'english' from.  This happens on a 3.3 install and on a 3.2.1 install [that I'll upgrade once I get one bridged archive straight]  You can have a quick fix by editing the header and putting in 'en' for the language.  But that means you'd have to do it each time you upgraded.

URL to your eFiction: http://www.obsidianaccord.com/archive/
Version of eFiction: 3.3
Have you bridged eFiction, if so with what?: SMF
Version of PHP:  4.4.4
Version of MySQL: 4.1.21-standard
Have you searched for your problem: (yes/no) Yes,
If so, what terms did you try:searched tinyMCE
State the nature of your problem: See below. 
Do you have a test account for us? user: efic pass:ef1csup

I have 4 instances of Efic that I've installed.  I make mention of this just for the comparison I did against them all to figure out what's going on.  One install [ http://www.obsidianaccord.com/library ] is a fresh 3.3 install.  I don't have this problem whatsoever.  The other I compared against [ http://writ.sansdreamscape.net/ ] was an upgrade from 2.0 [currently at 3.2.1] but I do not have the tinyMCE issue with that one as well.  The other two  http://www.obsidianaccord.com/archive/ and http://library.donnieyen.us have this issue.  The only difference between the two sets is I believe the sites where the problem's occurring had a custom tinyMCE config prior to upgrading to 3.0. [where messages.txt moved into a DB table]. Also it occurred to me while typing out what I did to fix this, both sites are bridged.  For this support thread, I'm just concentrating on http://www.obsidianaccord.com/archive/

No matter what steps I've taken, tinyMCE won't initialize properly.  Every time I try something, when I view the page source to see the tinyMCE init, it's always this:

tinyMCE.init({ 
theme: 'advanced',
height: '250',
language: 'english',
convert_urls: 'false',
mode: 'textareas',
extended_valid_elements: 'a[name|href|target|title]',
plugins: 'advhr,advimage,advlink,searchreplace,contextmenu,preview,fullscreen,paste,codeprotect',
theme_advanced_buttons1_add: 'fontsizeselect',
theme_advanced_buttons2_add: 'separator,pasteword,pastetext',
theme_advanced_buttons3_add_before: 'tablecontrols,separator',
theme_advanced_buttons3_add: 'advhr',
theme_advanced_toolbar_align: 'center',
theme_advanced_statusbar_location: 'bottom',
theme_advanced_path: 'false',
editor_deselector: 'mceNoEditor',
external_image_list_url : 'stories/1/images/imagelist.js',
theme_advanced_resizing: true,
entity_encoding: 'raw'
  });

The problem is the language variable.  It's pulling 'english' from somewhere and I couldn't figure out where.  My language setting in the settings table is 'en.' So what I did, was copy the init and put in the proper language setting in my tinyMCE custom page [because the script should load that if it's present.  What I put in there was this:

tinyMCE.init({ 
theme: 'advanced',
height: '250',
language: 'en',
convert_urls: 'false',
mode: 'textareas',
extended_valid_elements: 'a[name|href|target|title]',
plugins: 'advhr,advimage,advlink,searchreplace,contextmenu,preview,fullscreen,paste".($current == "adminarea" ? ",codeprotect" : "")."',
theme_advanced_buttons1_add: 'fontsizeselect',
theme_advanced_buttons2_add: 'separator,pasteword,pastetext',
theme_advanced_buttons3_add_before: 'tablecontrols,separator',
theme_advanced_buttons3_add: 'advhr',
theme_advanced_toolbar_align: 'center',
theme_advanced_statusbar_location: 'bottom',
theme_advanced_path: 'false',
editor_deselector: 'mceNoEditor'});

I cleared my cache, disabled Java for my browser, I deleted the tinyMCE folder, reuploaded it [huzzah for zip extraction on the server], browsed to a custom page to edit, re-enabled Java, and nothing.  Same problem exists- I missing some functions due to not finding the correct language

The next thing I tired was deleting the tinyMCE init outta the header and leave the tinyMCE custom page to see if that will load the init from there.  It didn't load anything.

I thought perhaps it may be the bridge, since the fresh install on http://www.obsidianaccord.com/library is not having this issue and is not bridged nor is the http://writ.sansdreamscape.net site bridged either.  I uninstall the bridge, add back the tinyMCE init to the header and try again.  When I take off the bridge, tinyMCE initializes like it should.  I delete the content of the custom tinyMCE page and verify that this still initializes like it should and it does.  So the problem is that when bridged, the language variable is pulling 'english' from somewhere instead of 'en'

If I hard code 'en' it will initialize on a bridged site.  I've been looking at the bridge files and my DB tables..but I think I've been looking at this too long to see anything anymore.  Any suggestions of places to look, I'd appreciate it.  Consequently if anyone has a test site and wants to see if they can replicate that, then that might narrow it down to a bug or it's just my sites.

EDIT: FYI, I've reinstated the bridge on http://www.obsidianaccord.com/archive and currently have 'en' hardcoded into the header for anyone that takes a look


 
Posted : 04/07/2007 10:33 am
(@tammy)
Posts: 2577
Member Moderator
 

It's SMF that's setting the global variable $language to "english" rather than "en".  Open get_session_vars.php and find the following line:


require_once(_BASEDIR.PATHTOSMF."SSI.php");

Change it to:


$eFicLang = $language;
require_once(_BASEDIR.PATHTOSMF."SSI.php");
$language = $eFicLang;

It's a bit of a cludge, but it fixes the problem with tinyMCE.  It may cause other problems, but I couldn't see anything on my test site.


 
Posted : 04/07/2007 3:49 pm
(@chelle)
Posts: 122
Estimable Member
Topic starter
 

So far it's fixed it, and I haven't run across any problems as a result yet.  Thanks Tammy.  πŸ˜€


 
Posted : 04/07/2007 6:40 pm
(@chelle)
Posts: 122
Estimable Member
Topic starter
 

Updating per Tammy's call for bug issues:

This is still present in the SMF bridge with the current download.  Will have to apply the fix Tammy detailed to get tinyMCE to use the language set in your Efiction settings


 
Posted : 30/10/2007 11:19 am
(@carissa)
Posts: 791
Member Moderator
 

This isn't in the bug forum though so I think that might be why the fix  wasn't included in the download. However, I talked to Tammy about this a few days ago because I'd never seen this thread and thought it was a server issue, but it persisted when I moved servers. πŸ™ She mentioned she was adding this to the next release so that's good news.


 
Posted : 30/10/2007 1:49 pm
Share: