Moodle 2.1+ TinyMCE form labels displayed with {#tags}

Moodle 2.1+ TinyMCE form labels displayed with {#tags}

by Mike Landis -
Number of replies: 9

Hi,

I'm using Moodle 2.1.1+  20110811 and in our TinyMCE Editor, where there are pulldowns and in the image browser, all the english text for the elements has what looks like language codes in it.  

For example, the font pulldown menu in TinyMCE has  "advanced.font" in it, and if you click on the format pulldown instead of "h1" it says "advanced.h1"...

And if you click on the add image button, the form labels look lie

{#advimage_dlg.general}   

....  with a button for {#browseimage}

 

And the confirmation and cancel button labels have

{#insert}     and  {#cancel}

Other than that, it works fine, but its like it isn't getting translated or something which is weird because the rest of the Moodle installation is working just fine.

Help!

 

 

 

Average of ratings: -
In reply to Mike Landis

Re: Moodle 2.1+ TinyMCE form labels displayed with {#tags}

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Wierd.. for sure... it may be a bug but more likely possibility something in the code has not been cleanly unzipped, or untarred or something, at installation. There are a couple of possibilities, you can go back to your original download and uncompress it again. FTP into your Moodle files, or if you have access to the server, delete the existing TinyMCE file and then paste the newly uncompressed tinyMCE file. The other alternative is to update your existing Moodle at the next updated release, 1st of October I think. (The release schedule is around somewhere in Moodle Docs.)  

BTW.. i am not sure why it has taken someone so long to respond to your query... sorry about that..smile

In reply to Mike Landis

Re: Moodle 2.1+ TinyMCE form labels displayed with {#tags}

by Mike Landis -

I figured this out...

I had created this Moodle by copying another instance of another moodle and wiping out all the courses.

For some (in my opinion likely very stupid) reason, language packs are in the moodle data directory.  Language packs are not data - the data directory is supposed to be for stuff that people upload to their courses, not part of moodle operational files.  Language packs are part of the system, not part of the data. It needs to be relocated.

Anyway, for some reason only TinyMCE was affected, and if you happen to have this problem, check to see if your (I bet new) moodle data directory has in it the language that you are expecting it to have.

Since the database I was copying was set to en-us, and there was no en-us pack installed, two things happened:

1) The language settings repoted "en" as the language I suppose because "en-us" was missing and...

2) TinyMCE was still looking for "en-us" and it wasn't there. I think? 

Anyway, reinstalling the "en-us" language pack from the language packs admin setting fixed it.

If you set up a new moodle instance by copying, now you have to remember to manually reinstall your language packs too.   Or you might remember to copy over the lang directory from moodledata (We store the moodle data on a separate larger network storage volume.)

Thanks!

Mike

In reply to Mike Landis

Re: Moodle 2.1+ TinyMCE form labels displayed with {#tags}

by michael mckenzie -

I have installed the tinymath editor customisation, and after some time, the labels seem to get lost. I have noticed that it disappeared then came back. There are no files in the moodledata/lang directory. Any suggestions.

I would also like to know how the editor is selected. When editing questions with the calculated question plugin, I get the original tinymce toolbar, but other locations seem to have defaulted to the tinymath config. Any suggestions

In reply to michael mckenzie

Re: Moodle 2.1+ TinyMCE form labels displayed with {#tags}

by Mauno Korpelainen -

Tinymath editor is using custom files from lib/editor/tinymath and default editor is using files from lib/editor/tinymce. Both the default editor and tinymath customization are using a default language strings - tinymce from lib/editor/tinymce/lang/en/editor_tinymce.php and tinymath from lib/editor/tinymath/lang/en/editor_tinymath.php

The translation of strings can be done for installed language packs from administration menu (or by adding manually created new language folders to parallel subfolders of .../lang/en )

Are you using en or en_us as a default language for your site and are you using different themes on site - some with tinymce and some with tinymath? Two included themes - mathstandard and stylist - have in their config.php or lib.php a line that sets available editors to tinymath and textarea while the administration menu has settings for selecting site default editor ...plugins > texteditors... so depending on the way how you have set your site to use editors moodle could try to use language files that have not been created for that editor (pure guess)

If you see tinymce only in calculated questions and tinymath elsewhere it must be some kind of a core hack in that particular question type - I must check that out and test myself to be sure what's going on ...

In reply to Mauno Korpelainen

Re: Moodle 2.1+ TinyMCE form labels displayed with {#tags}

by michael mckenzie -

Mauno,

I was playing with 2.1 but I fell back to 2.0. This is my first Moodle install. I followed your advice and have enabled the maths theme for all the maths courses so that they are now using tyiy maths and everyone else is defaulting to the tinymce.

I had fiddled with the tinymath toolbar and it seemed to work ok after that, then it lost the language files.

I have been playing around with your Maths interfaces. I find that everying works in firefox, but that anything that is trying to inject back into the web page has troubles in either ie9 or chrome, so google graphs and jsxgraph have some problems.

Thanks for the reply. I will keep playing around and get back to you

In reply to michael mckenzie

Re: Moodle 2.1+ TinyMCE form labels displayed with {#tags}

by michael mckenzie -

An update,

having installed your advanced maths filters and tinymath for a new 2.0 install, the labels data structure is lost again. I am using en not en-us. I have the lang directories for tinymaths and tiny mce under thier directories in the editors folder of lib.

Are the lookups done in php or in java script. Where should I be looking?

In reply to michael mckenzie

Re: Moodle 2.1+ TinyMCE form labels displayed with {#tags}

by Mauno Korpelainen -

Is your site online and can you give me a temporary access to some demo course? You can see my email in my profile (Click my name).

Something in your environment is obviously breaking some part of javascripts - it might be possible to use brower debugging (error console in FF / mouse right click - Inspect element in Chrome or F12 - script debugging in IE9 ) to find out some possible reasons or turn php debugging to ALL from site administration menu...

Some of my first files in http://moodle.org/mod/forum/discuss.php?d=182627 did have buggy files and some of those bugs have been fixed (at least JSXGraph bugs) since the first "release" but for example this "google chart wizard tool" has a known IE9 bug - it should work fine in other than IE browsers. And those plugins that use applets may have problems in Safarí. But I have not yet been able to reproduce this missing plugin lang string issue so it would be nice to know where the problem comes from.

I have not tested all possible environments - for example https sites or Mac sites - and some server side setting could also prevent some scripts from taking action, but most of all I suspect that either some file might be missing (from my package???) or some file might be corrupted (during the upload process?) or some of your system files (config.php etc) might have some code that breaks javascript or php code somewhere. There are lots of possible break points but I would start looking from error debugging...

In reply to Mauno Korpelainen

Re: Moodle 2.1+ TinyMCE form labels displayed with {#tags}

by Steven Geggie -

This is related to your profile.    I fixed by changing the editor type, saving.  then changing back to HTML Editor and saving.

In reply to Mike Landis

Re: Moodle 2.1+ TinyMCE form labels displayed with {#tags}

by Soheil Qanbari -

Hi Mike,

I truly appreciate your input. I migrated to Moodle 2.6.5. I tried all solutions with no success! I reinstalled all Language packs, re-installed the tinyMCE completely. Also copied the tinyMCE language file in the Moodledata directory:

sandboxdata/lang/en_us/editor_tinymce.php

So far no success!

Is there any language path referencing in the DB for the tinyMCE?

Attached what I see and is very annoying indeed! Any thoughts is highly appreciated!


Thank you.

Attachment tinyMCE.png