Strange error "Your message contains too few characters"

What general questions do you have about this virtual community that the FAQ link didn't answer? What problems are you having in getting started on this site? All Villagers may post here.

Moderators: jochanaan, MatthewNeal, jimmy, Senior Moderator, Moderators

Strange error "Your message contains too few characters"

Postby jasenj1 » Sun Nov 03, 2013 6:18 am

I frequently get the error, "Your message contains too few characters."

This seems to happen any time I copy & paste text into the message composition box. Even if I've typed a bunch, copying from somewhere else on the web page into the message box generates the error.

I wonder if it has something to do with the formatting. I notice that when I copy & paste from a web page the color & font are preserved - e.g. I tried to copy & paste the error message, it pastes as red in a larger font.

FWIW, I'm on a Mac using Safari. I've never seen this sort of problem on any other forum.

- Jasen.

P.S. Curiously, if I copy & paste into a local text editor, then paste back into the forum, things work. It seems to be copy & pasting within the browser that breaks things.
jasenj1
Native Resident
 
Posts: 505
Joined: Tue Oct 29, 2013 12:42 pm

Re: Strange error "Your message contains too few characters"

Postby bn2bnude » Sun Nov 03, 2013 9:02 am

Yes, a Safari problem... I don't see it with Firefox or Chrome.
So now there is no condemnation for those who belong to Christ Jesus. (Rom 8:1 NLT)



If I speak with the tongues of men and angels but do not have love, I am only a resounding gong or a clanging cymbal. (1 Cor 13:1)
User avatar
bn2bnude
Native Resident
 
Posts: 2712
Joined: Fri Jul 21, 2006 8:09 am
Location: Denver

Re: Strange error "Your message contains too few characters"

Postby webmeister » Sun Nov 03, 2013 10:23 am

If you are not already doing this:
You might try Cntrl C to copy for windows or Command C for Mac (highlight first of course)
Then to paste Cntrl V for windows or Command V for Mac.
Many times these text editors do not work with right click mouse copy & pasting...
Live - Love - Laugh
Have Fun!
User avatar
webmeister
Native Resident
 
Posts: 344
Joined: Fri Nov 01, 2013 7:03 pm
Location: Northern California

Re: Strange error "Your message contains too few characters"

Postby bn2bnude » Sun Nov 03, 2013 11:14 am

webmeister wrote:If you are not already doing this:
You might try Cntrl C to copy for windows or Command C for Mac (highlight first of course)
Then to paste Cntrl V for windows or Command V for Mac.
Many times these text editors do not work with right click mouse copy & pasting...


It's not an issue of not being able to copy/paste.

I prepared a long post, complete with copy/paste of Scriptures, etc. The text is all there but, when using Safari and hitting submit, you get the error Jasen mentions above. I've not seen the same behavior with Chrome or Firefox (I've not tried Opera and IE isn't an option on Mac). I suspect a Javascript inconsistency but who knows.

Just a note, I've turned on the Safari Developer menu (I have later OS X - 10.9 and Safari - 7.0 than Jasen lists). Some time back, Apple quit including Adobe Flash Player with their OS and expect their users to install it themselves. I decided that I could go without it which works about 65% of the time. For those that don't, Chrome has it's own version of flash player. When I get a video (for instance) that doesn't play, I can open the same page by pulling the developer menu open and selecting the Chrome browser with "Open Page With"
So now there is no condemnation for those who belong to Christ Jesus. (Rom 8:1 NLT)



If I speak with the tongues of men and angels but do not have love, I am only a resounding gong or a clanging cymbal. (1 Cor 13:1)
User avatar
bn2bnude
Native Resident
 
Posts: 2712
Joined: Fri Jul 21, 2006 8:09 am
Location: Denver

Re: Strange error "Your message contains too few characters"

Postby webmeister » Sun Nov 03, 2013 2:17 pm

bn2bnude wrote:It's not an issue of not being able to copy/paste.

I prepared a long post, complete with copy/paste of Scriptures, etc. The text is all there but, when using Safari and hitting submit, you get the error Jasen mentions above. I've not seen the same behavior with Chrome or Firefox (I've not tried Opera and IE isn't an option on Mac). I suspect a Javascript inconsistency but who knows.

Just a note, I've turned on the Safari Developer menu (I have later OS X - 10.9 and Safari - 7.0 than Jasen lists). Some time back, Apple quit including Adobe Flash Player with their OS and expect their users to install it themselves. I decided that I could go without it which works about 65% of the time. For those that don't, Chrome has it's own version of flash player. When I get a video (for instance) that doesn't play, I can open the same page by pulling the developer menu open and selecting the Chrome browser with "Open Page With"


I copy :)
I know that there are differences between mouse pasting and keyboard pasting in some applications...good luck.
Live - Love - Laugh
Have Fun!
User avatar
webmeister
Native Resident
 
Posts: 344
Joined: Fri Nov 01, 2013 7:03 pm
Location: Northern California

Re: Strange error "Your message contains too few characters"

Postby jasenj1 » Sun Nov 03, 2013 6:57 pm

This is a test.
Last edited by jasenj1 on Sun Nov 03, 2013 8:45 pm, edited 9 times in total.
jasenj1
Native Resident
 
Posts: 505
Joined: Tue Oct 29, 2013 12:42 pm

Re: Strange error "Your message contains too few characters"

Postby jasenj1 » Sun Nov 03, 2013 7:27 pm

I think I know what the problem is.

In file wc.js, line 477, function _process(a,b). The comment above the function definition is "// processing HTML code to BBcode".

This function chops up the "style" attribute and converts it to BBCode. Safari's style attribute has a space at the end. Something like "font-size: 13px; " The space at the end of the string is the important bit.

Line 479 splits the style attribute based on ";". For most style rules, this yields " thing: value". But the last "; " generates a " " as an item. When this trailing " " is processed as a thing:value pair an exception occurs. That seems to generate the "too few characters" error.

I believe the "style" element in the array generated from arg b needs to be .trim()ed for Safari. So line 479 would become:

var d=b['style'].trim().split(";");

I'll try debugging the JavaScript with Chrome or Firefox and see if I can figure out why they don't fail.

- Jasen.

P.S. Why yes, I am a software developer for my day job. :P
jasenj1
Native Resident
 
Posts: 505
Joined: Tue Oct 29, 2013 12:42 pm

Re: Strange error "Your message contains too few characters"

Postby webmeister » Sun Nov 03, 2013 7:55 pm

Don't Quit, you're good...LOL!
Live - Love - Laugh
Have Fun!
User avatar
webmeister
Native Resident
 
Posts: 344
Joined: Fri Nov 01, 2013 7:03 pm
Location: Northern California

Re: Strange error "Your message contains too few characters"

Postby jasenj1 » Sun Nov 03, 2013 8:50 pm

Yeah, Chrome doesn't have the extra space at the end of the style attribute. And Firefox doesn't seem to use that function at all. So while it does appear to be Safari specific, I think the code could be easily fixed to play nice with Safari.

- Jasen.

(Maybe next I'll tackle why the "Custom Menu" is crazy.)
jasenj1
Native Resident
 
Posts: 505
Joined: Tue Oct 29, 2013 12:42 pm

Re: Strange error "Your message contains too few characters"

Postby jasenj1 » Sun Nov 03, 2013 9:22 pm

So wc.js comes from Almsamim, the fancy editor. A quick Google for it turns up this Google Code page. The best I can tell, the issue with Safari has been fixed in the latest version of the code. The newest version there is from 2009, though. I don't know if there's a newer version somewhere else out on the Internet.

- Jasen.
jasenj1
Native Resident
 
Posts: 505
Joined: Tue Oct 29, 2013 12:42 pm


Return to Questions about this website

Who is online

Users browsing this forum: No registered users and 3 guests