Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 11:17:18 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149634 Posts in 21099 Topics by 7537 Members
Latest Member: lotte2
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: FCEditor and module news problem  (Read 3432 times)
Tin

Offline Offline

Posts: 114



« on: May 06, 2006, 09:24:23 AM »

Hi

I found a problem when you are running the FCKeditor and the news module.

To write a new news message there is no problem. But if you want to edit an already stored news message with the FCKeditor and if the message contains eg. German umlauts - these umlauts are wrong displayed.

If you edit a page with FCKedtior it's ok.

If you edit a news message with the HTML_Area editor it's ok as well.

So the problem I found in the combination FCKEditor/news  module. BTW - my WB is running utf-8.

BTW the pages are stored in the DB with the real utf-8 code.

Martin
« Last Edit: May 06, 2006, 12:44:07 PM by tin » Logged

Gruss von Tin
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7661



WWW
« Reply #1 on: May 06, 2006, 11:49:45 AM »

Hello,

I'm not shure that this is a fckeditor problem. Tried a little bit with german "umlauts" and utf-8. On my test enviroment with utf-8 german umlauts are not stored correct. I think a third compnente is also the mysql version.

So can you look what is exactly stored in the database with the different configurations you described. I'm pretty shure that this is different.

I use ISO-8859-1 and hat no problems, not with FCKEDitor, not with HTMLArea and not in admin interface.

Matthias


Logged
Tin

Offline Offline

Posts: 114



« Reply #2 on: May 06, 2006, 12:01:06 PM »

Ok I'll make some more tests. But as written in my first message - in combination HTML_Area and news module I didn't found the problem...
Logged

Gruss von Tin
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7661



WWW
« Reply #3 on: May 06, 2006, 12:30:00 PM »

HTMLArea produces other code then FCKEditor. HTMLArea is a little bit older and don't understand and couldn't convert valid htmlcode of german umlauts (ü=ü) FCKEditor converts everything to valid htmlcode.

Matthias
Logged
Tin

Offline Offline

Posts: 114



« Reply #4 on: May 06, 2006, 12:41:03 PM »

Ok - I checked the database.

There is an older news message in the database which was written before the WB upgrade and with this message the umlauts are stored in the real  utf-8 two letter code.

The news messages after the WB upgrade are stored in the database with the HTML code - like ä - but now it seems that the FCKEditor doesn't display the news message taken from the database with the utf-8 code when you want to edit it. Or is there any options to set for FCKEditor that it has to run in utf-8 mode?

Martin
Logged

Gruss von Tin
Tin

Offline Offline

Posts: 114



« Reply #5 on: May 06, 2006, 07:47:53 PM »

Ok - made some tests and it seems to me that it's a FCKEditor bug!

I wrote a news message with FCKEditor with some German umlauts. In the database they are stored in HTML format (like ä).

When I want to edit this message FCKEditor displays the umlauts not correctly - it displays it in ISO-8859-1 format - but my installation is set for utf-8.

If I change to Tiny_MCE or Xinha editor the message is correctly displayed!

As said - it seems to me that this is a FCKEditor bug - it doesn't follow the character code settings in the options menu of WB.

Update: Is more complicated as I thought... Xinha stores the German umlauts in the utf-8 two letter code in the database...

Oh boy...


Martin
« Last Edit: May 06, 2006, 07:59:01 PM by tin » Logged

Gruss von Tin
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7661



WWW
« Reply #6 on: May 07, 2006, 05:58:24 AM »

Hello tin,

I'm not shure, will have a look at it when i have more time, but FCKEditor is the only one wich looks to Charset Options of the page all other Editors are allways fixed working with UTF-8. So I'm not shure if it is a bug from FCKEditor, it is the way he should work. Maybe ask in the FCKEDitor for a solution of this (fixing FCKEDitor to use UTF-8). Just an Idea.

Matthias
Logged
Tin

Offline Offline

Posts: 114



« Reply #7 on: May 07, 2006, 09:05:51 AM »

Hello Matthias

Well - "bug in FCKEditor" was to hard - as described in the original post - it's the combination of FCKEditor and the News module where I found this problem. Using the FCKEditor to edit and change pages there I didn't got it. I don't know who the news module reads a message from the database and calls the editor - I should then read the php code...

Martin
Logged

Gruss von Tin
nepo77

Offline Offline

Posts: 8



« Reply #8 on: July 16, 2006, 10:22:47 PM »

Hi , i have the same problem, is there a solution ?
Logged
Legshot

Offline Offline

Posts: 6


« Reply #9 on: September 08, 2006, 11:23:06 AM »

I traced the error to a missing call to the "htmlspecialchars" function. When a normal page is edited, this function is called on the data retrieved from the database. You just have to change two lines in your /modules/news/modify_post.php which are:

114-old
Code:
show_wysiwyg_editor("short","short",$fetch_content['content_short'],"100%","135px");
114-new:
Code:
show_wysiwyg_editor("short","short",htmlspecialchars($fetch_content['content_short']),"100%","135px");

122-old:
Code:
show_wysiwyg_editor("long","long",$fetch_content['content_long'],"100%","300px");
122-new:
Code:
show_wysiwyg_editor("long","long",htmlspecialchars($fetch_content['content_long']),"100%","300px");

HTH,
Chris
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!