HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Weird characters when using WYSIWYG editor

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#102767 (In Topic #20132)
Avatar

Fan in action

Hi,

I've recently cloned my ocportal install to a new directory in my server and now I'm having this weird issue where if users are making forum posts or topics using the WYSIWYG editor, it'll add a weird character every time they press enter

Here's an example




If I disable the WYSIWYG editor the issue does not occur.

Any idea what could be causing this?? The old installation does not have this problem and I don't even know where to begin to fix that. O_o
Back to the top
 
Posted
Rating:
#102768
Avatar

Fan in action

While on the subject of weird characters, does ocPortal support special characters (unicode) such as in the username field?
Back to the top
 
Posted
Rating:
#102771
Avatar

Does this happen on all web browsers, or just a particular one?

Is it immediately when you press enter, or when you come back to edit again after having done so before saving?

Are you on 9.0.12? (we just upgraded CKEditor in that)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#102772
Avatar

DoDD said

While on the subject of weird characters, does ocPortal support special characters (unicode) such as in the username field?

If you make the language pack utf-8. See the internationalisation tutorial, but basically you translate the charset language string to utf-8.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#102780
Avatar

Fan in action

Chris Graham said

Does this happen on all web browsers, or just a particular one?

Is it immediately when you press enter, or when you come back to edit again after having done so before saving?

Are you on 9.0.12? (we just upgraded CKEditor in that)
The weird characters appear as soon as I hit enter.

I've seen this happening on both Safari and Mozilla FF on Mac OS X Mountain Lion. Some of my user's have experienced this and I think at least one of them was also on a Mac.

I have disabled WYSIWYG editor for now.


Chris Graham said


If you make the language pack utf-8. See the internationalisation tutorial, but basically you translate the charset language string to utf-8.
Is this the tutorial you're talking about?

ocPortal Tutorial: Localisation and internationalisation - ocPortal.com

I'm sorry but I'm having the darnest time figuring out how to change the charset to utf-8

Do I have to edit the charset string on every language file? If so, how?
Back to the top
 
Posted
Rating:
#102782
Avatar

Community saint

Experienced a similar issue when creating a table, (latest version), which I was able to reproduce. See screenshots.

Back to the top
 
Posted
Rating:
#102789
Avatar

Do I have to edit the charset string on every language file? If so, how?

There is a single language string called 'charset'.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#102790
Avatar

Is there a link I can reproduce the problem on? It may be a server misconfiguration.

Also, please tell me the exact keystrokes. E.g. does pressing enter just once do it, with no other characters typed first?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#102798
Avatar

Community saint

Just changing the view from wysiwyg to source inserted the code in my screenshots.
Back to the top
 
Posted
Rating:
#102800
Avatar

OK, I can reproduce on your site KingBast. It is probably something to do with the server's default character set configuration for serving Javascript files, or if they were manually uploaded in FTP 'text mode'. Investigating…


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#102801
Avatar

Update…

ckeditor.js from your server diffs as identical, so it's probably not an upload issue.

Also the server is not explicitly setting a character set.

People on the CKEditor forums are reporting similar issues, but it's odd that I could not reproduce them on my server (or most other users).

Still investigating…


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#102802
Avatar

Ergh, okay I can reproduce locally if I disable utf-8, which I have on there.

Okay, seems this is a bug in the latest CKEditor we just upgraded to.

Checking on a resolution…


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Item has a rating of 5 (Liked by FletchLiked by Guest)  
Rating:
#102804
Avatar

Put this on the bottom of your data/ckeditor/.htaccess file:

Code

AddCharset UTF-8 .js
Then refresh.

I have reported the issue to the CKEditor folks…
single line break adding special characters | CKEditor.com


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#102811
Avatar

Community saint

Thanks Chris.
Back to the top
 
Posted
Rating:
#102825
Avatar

Fan in action

Chris Graham said

Put this on the bottom of your data/ckeditor/.htaccess file:

Code

AddCharset UTF-8 .js
Then refresh.

I have reported the issue to the CKEditor folks…
single line break adding special characters | CKEditor.com

I did this and I have not been able to reproduce the issue since. :)


Chris Graham said

Do I have to edit the charset string on every language file? If so, how?

There is a single language string called 'charset'.

I must be missing something really obvious here. Where do I make that change?  :(
Back to the top
 
Posted
Rating:
#102866
Avatar

Fan in action

DoDD said

I must be missing something really obvious here. Where do I make that change?  :(

Nvm, I knew it was something obvious. I got the utf8 addon installed and changed the collation to my DB to utf8_general.

However, now I'm having another interesting issue (not sure if it's an actual issue though).

I've set up a brand new install of ocportal 9.0.12 to use as a sandbox and there I can display certain special characters such as † (†) in the username field.

However, in may main site, when I add the same exact character in the username field or the Title field, ocportal changes it to † (dash, pipe, dash)

Any reason why this would happen if both installs are ver. 9.0.12 and mysql collation is the same through out the database, tables and columns (utf8_general_ci)?
Back to the top
 
Posted
Rating:
#102867
Avatar

Fan in action

Well this is weird. Here it displays the special char normally. The second example was supposed to be something like - | - but without the spaces. Here it just changes it to the actual dagger char
Back to the top
 
Posted
Item has a rating of 5 (Liked by Guest)  
Rating:
#102869
Avatar

This is complex, character sets are.

It sounds like one isn't UTF-8 in ocPortal (forget the database for a moment).

Normally when an invalid character is sent through, the web browser converts it into an HTML entity automatically. Whether ocPortal can display that entity as a character or not, or displays it as code, depends if the field is Comcode or not (Comcode supports parsing of HTML entities).

However, a few symbols, including the dagger, are a special case. Windows has a standards compliancy issue. It doesn't use ISO-8859-1, it uses something called Windows ANSI, which is almost the same, but not quite. Therefore the browser will submit certain discrepant characters without converting to entities. ocPortal detects this, and converts them to safe ASCII equivalents, which work both within Comcode (Comcode recognises them as textcode, and are also comprehendible to humans). We could avoid doing this conversion, but non-Windows users would not see what Windows users saw.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#102875
Avatar

Fan in action

I know this is a stupid question but how do you refresh the .htaaccess file????

I have been up to long. Is this a clear cache job? O_o

The forums are filling up with junk chars!!! Even tough I have applied the hot fix. Though I have had to upload one file at a time and so I did not do all the lang files only english and did not change all the pic files.


Last edit: by Truffs
Back to the top
 
Posted
Rating:
#102876
Avatar

I know this is a stupid question but how do you refresh the .htaaccess file????

There is no such thing. Changes to it apply immediately.

The forums are filling up with junk chars!!! Even tough I have applied the hot fix

Are you saying that even though the fix has been applied (in particular data/ckeditor/ckeditor.js), new forum posts still come through as corrupt? From multiple users?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Expand