OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



some TinyMCE questions

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

some TinyMCE questions

Postby iluber » Thu Oct 02, 2008 5:55 am

Hello I'm using OCS 2.1.1 and I have some questions about tinyMCE integration:

1) first of all, I see that in OCS 2.1.1 is included the version 3.0.7 version of tinyMCE. Is this right ? Can I update to the latest one (3.2 currently ) ?

2) in OCS are included only the enhlish locales of tinyMCE . Is this intentional ? In my case I have to use italian and the hints dipslayed by the tinyMCE buttons are not translated even if the TinyMCEPlugin.inc.php file sets up many locales, italian included
Am I supposed to install the needed tinyMCE locales by myself ?

3) I did it anyway and copied the various files in the correspondign directories, but, even if the language is correclty set up to it in the tinyMCE control , the transltaed labels are not there
iluber
 
Posts: 30
Joined: Wed May 14, 2008 8:11 am
Location: Pisa, Italy

Re: some TinyMCE questions

Postby mcrider » Thu Oct 02, 2008 4:54 pm

Hi Iluber,
iluber wrote:1) first of all, I see that in OCS 2.1.1 is included the version 3.0.7 version of tinyMCE. Is this right ? Can I update to the latest one (3.2 currently ) ?

You can upgrade to the latest tinyMCE at your own risk. It will probably work, and the only problem I foresee is the image upload tool possibly conflicting with the new version, but that tool is only in CVS anyway and won't be included in a public release until the next major version (2.3).

iluber wrote:2) in OCS are included only the enhlish locales of tinyMCE . Is this intentional ? In my case I have to use italian and the hints dipslayed by the tinyMCE buttons are not translated even if the TinyMCEPlugin.inc.php file sets up many locales, italian included
Am I supposed to install the needed tinyMCE locales by myself ?

As TinyMCE is a third party tool, we have no control over their internationalization. You could provide your own translation, but you will have to consult TinyMCE's documentation for further info.

iluber wrote:3) I did it anyway and copied the various files in the correspondign directories, but, even if the language is correclty set up to it in the tinyMCE control , the transltaed labels are not there
Try deleting the data cache as a system administrator or clear out the files in the cache directory. TinyMCE caches all of its code into a .gz file and needs to be reloaded whenever changes are made to its code.

Let us know if you need further help!

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: some TinyMCE questions

Postby iluber » Fri Oct 03, 2008 4:56 am

Hi mcrider

mcrider wrote:Hi Iluber,
You can upgrade to the latest tinyMCE at your own risk. It will probably work, and the only problem I foresee is the image upload tool possibly conflicting with the new version, but that tool is only in CVS anyway and won't be included in a public release until the next major version (2.3).


Ok thanks

mcrider wrote:
2) in OCS are included only the enhlish locales of tinyMCE . Is this intentional ? In my case I have to use italian and the hints dipslayed by the tinyMCE buttons are not translated even if the TinyMCEPlugin.inc.php file sets up many locales, italian included
Am I supposed to install the needed tinyMCE locales by myself ?

As TinyMCE is a third party tool, we have no control over their internationalization. You could provide your own translation, but you will have to consult TinyMCE's documentation for further info.
[/quote]

I see


mcrider wrote:3) I did it anyway and copied the various files in the correspondign directories, but, even if the language is correclty set up to it in the tinyMCE control , the transltaed labels are not there
Try deleting the data cache as a system administrator or clear out the files in the cache directory. TinyMCE caches all of its code into a .gz file and needs to be reloaded whenever changes are made to its code.

Let us know if you need further help!

Cheers,
Matt[/quote]

I tried that but I had also to delete a tiny_mce_9bf7753d346f5af214e96c0a4bf10087.gz file inside the tinyMCE directories.
As expected it has been recreated and now translations are there.
Thank for your help
iluber
 
Posts: 30
Joined: Wed May 14, 2008 8:11 am
Location: Pisa, Italy

Re: some TinyMCE questions

Postby iluber » Fri Oct 03, 2008 7:06 am

Let me add, however, that the fact that there are not translations in the tinyMCE instance distributed with OCS should be mentioned in the installations instructions in the OCS documentation, because, even if I agree with you that it is a 3rd party tool , PKP is responsible for what delivers , and stating that OCS is internazionalized is not completely true if tinyMCE doesn't support the same translations.
iluber
 
Posts: 30
Joined: Wed May 14, 2008 8:11 am
Location: Pisa, Italy

Re: some TinyMCE questions

Postby mcrider » Mon Oct 06, 2008 11:17 am

Hi iluber,

The difficulty with installing language packs with TinyMCE is because we use the cached version of the plugin. If we didn't, we could load in the language packs, and do some coding to ensure that the proper language is loaded depending on what language the user is using. However, as TinyMCE is cached by the server, and all of its contents added to a gzip file, only one language can be loaded in. I think our developers probably chose to sacrifice internationalizing TinyMCE for the sake of speed, and figured the icons are descriptive enough for non-english users to be able to use it sufficiently well.

Kind regards,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: some TinyMCE questions

Postby iluber » Tue Oct 07, 2008 2:47 am

There are a few issues with this approach in my opinion.
When the user put the mouse arrow on one of the tinyMCE controls a hint is showed up and on it there is some weird label idientifier. This has to effects:

- the customer that hires a professional to configure, install and customize the software has an impression of low professional attitude since it has been promised an iinternazionalized software and it is not completely true

- the end users (you know they can be really various) can complain with the customer saying that they are offering a low quality service.

OCS is a great piece of software but these are details that can have weight in customer choices.

Moreover I have noticed that sometime the tinyMCE buttons don't show up in some page and I have to clean the cache to make things work. This happened to me with Firefox 3.0.1.
The reason is that under circumstances I have not been able to determine when the page is loaded the ui.css is not loaded.

I have updated to 3.0.3 and still the problem is there. Our customer uses Firefox 3.0.3 but has nevewre recognized the same problem. So maybe this depends on some of the addons I have installed on my Firefox instance.

All these caching levels (OCS template, OCS cache, browser cache, tinyMCE) in my opinion can lead to problems really difficult to debug.

My suggestion is that you reconsider the choice to use the cached version of tinyMCE

Cheers
iluber
 
Posts: 30
Joined: Wed May 14, 2008 8:11 am
Location: Pisa, Italy

Re: some TinyMCE questions

Postby asmecher » Tue Oct 07, 2008 11:28 am

Hi Ivano,

If I understand the conversation so far, there are a couple of issues: first, we're not shipping any locales with TinyMCE other than English, and second, it's necessary to delete the cache before TinyMCE will be regenerated with additional languages (if they've been installed). Let me know if I've missed something.

As for shipping additional locales -- we haven't included additional TinyMCE languages thus far simply due to the amount of maintenance it would take. TinyMCE is supported via a plugin and we don't consider it absolutely crucial to the software, though it is becoming more important and widely used, so we might start including additional locales in the future.

Caching in its various forms is absolutely necessary for OCS to perform well, but the cache shouldn't cause a problem with additional locales once the locales have been installed and the cache cleared. Changing languages etc. should work fine. Let me know if there's something unusual happening here.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9230
Joined: Wed Aug 10, 2005 12:56 pm

Re: some TinyMCE questions

Postby iluber » Wed Oct 08, 2008 3:16 am

Hi asmecher, I'm asmecher there are sure the issues you have cited.
Moreover I have noted a strange behavior of tinyMCE, that in some cases is not able to write the ui.css import statement and therefore don't show the tinyMCE controls around the text area.

It is something that I have been able to observe only on my Firefox instance and usually controls are showed again if I clean the browser cache.
This is way I have not posted this a bug on any place: I'm not sure what the problem is (tinyMCE, firefox cache, firefox addo ons installed on my instance, OCS template) .


This is why I was suggesting that maybe inserting a cached version of tinyMCE in OCS that already has two different caching levels it is not a good idea.
iluber
 
Posts: 30
Joined: Wed May 14, 2008 8:11 am
Location: Pisa, Italy

Re: some TinyMCE questions

Postby asmecher » Wed Oct 08, 2008 10:30 am

Hi Ivano,

TinyMCE is only cached at one level. If you're able to determine what's happening with the controls occasionally disappearing, please let us know -- I haven't been able to observe it myself. I'll keep an eye open, however. The team mostly uses Firefox as well.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9230
Joined: Wed Aug 10, 2005 12:56 pm

Re: some TinyMCE questions

Postby ramon » Thu Dec 04, 2008 7:46 am

Hello all,

I'm having problems with the character encoding with TinyMCE.
I've done pretty much everything possible:
1 - Sent as UTF8
2 - Kept it as Latin1
3 - Tested converting to HTML special characters
4 - Kept original Moxicode files

No luck in making special characters display correctly:
this
Code: Select all
 Deseja mais informa\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00B5es


should be
Code: Select all
 Deseja mais informações


Any ideas, except removing special characters, or copying the english files and renaming to pt.js??
ramon
 
Posts: 940
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: some TinyMCE questions

Postby mcrider » Thu Dec 04, 2008 11:38 am

Hi Ramon,

I believe this discussion is relevant to your question--basically, its a bug, but its already fixed in the CVS version of OJS.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: some TinyMCE questions

Postby ramon » Thu Dec 04, 2008 2:17 pm

Hello Matt,

I read the post and tried that code modification.
Nothing happened.
I then changed the language files, to see if that was the problem, still no luck...

Any way of running an iconv command on all pt*.js files, to change them to UTF-8?
There are quite a few files and converting one by one seems a bit archaic...

Will converting them to UTF-8 help anyway?
ramon
 
Posts: 940
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: some TinyMCE questions

Postby mj » Sat Dec 06, 2008 1:30 am

Hi Ramon,

The bugzilla issue Matt refers to only affects value entered through forms, ie. encoding of data within OxS, not the code files themselves. Modifying the tinyMCE Javascript directly may well introduce encoding issues that make the situation more complicated. They do have more information on language packs at:

http://wiki.moxiecode.com/index.php/Tin ... nguagePack
http://wiki.moxiecode.com/index.php/Tin ... g_Language

EDIT: I just checked the Portuguese language pack for TinyMCE (available here) and it looks like it's encoded incorrectly. I can confirm it's neither UTF-8, Latin-1, or Windows-1252. According to their site:

If you notice a broken language package or some form of abuse in the language used, please use the email function in the forum to alert us of this. We can revert to older packages if needed.


I'd suggest this is probably the best course of action. It looks like the Portuguese pack was updated yesterday, so it's probably a relatively recent bug that's yet to be reported.

Hope this helps,
MJ
mj
Site Admin
 
Posts: 304
Joined: Fri Mar 26, 2004 9:32 am
Location: Toronto, Canada

Re: some TinyMCE questions

Postby daskey » Fri Feb 20, 2009 1:28 pm

Greetings all,

Rather than open a new thread, I thought I'd append to this one since I believe the fix I need might well have been discussed earlier in it.

The issue: I have TinyMCE enable for all of our journals. It loads where it should with no errors and is functional, but the images on the toolbar do not load. The functions work, and one sees the reserved space for the image on mouseover, but the images themselves do not load. I assume that this is likely a path problem. I see where the images reside in the OJS structure, i.e.-

[path_to_OJS]/lib/tinymce/jscripts/tiny_mce/themes/simple/images

but they do not load on the journal interfaces. I cannot say exactly when this began, but definitely after an upgrade to 2.2.2 we did a while back. The only mucking with general paths that I do is a bit of URL rewriting to get rid of index.php, thusly:

Code: Select all
RewriteEngine On
RewriteBase /journals
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]


but that's been in place since we first installed OJS about 14 months ago and has not caused trouble before.

I've seen suggestions in this thread to delete the cache files. Would that work in this instance? I'm hesitant to just start hacking away without asking if anyone has seen this behavior in OJS before. Many thanks for any thoughts or advice.

Best regards,
Dale Askey
daskey
 
Posts: 33
Joined: Wed Jan 16, 2008 9:10 am

Re: some TinyMCE questions

Postby mcrider » Fri Feb 20, 2009 2:34 pm

Hi Dale,

Clearing the cache will not damage anything on your system so there is nothing to be scared about. TinyMCE is cached, so if there are changes to it, or if there are any problems with it, you'll have to clear the cache.. To delete most things in the cache, you can log in as Site administrator and select 'Clear Data Caches' on the adminstrators home page, but the cached TinyMCE code will not get deleted that way. You'll have to go in and manually delete the tiny_mce_xxxxxxx.gz file in the cache/ directory of OCS. Try that, and if it doesn't fix your problem we can troubleshoot this some more.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Next

Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests