I have come across a bug in the TinyMCE Spellchecker. Was wondering if someone else has come across it as well. I get it when using single quotes and there is a misspelling:
When I copy that error HTML and put that inside an html page I get this:
I have very few problems with the spellcheck in V3... other than false positive like the word "the" and other silliness. It does not choke on the entire page and throw an error thow. I upgraded a few sites to V4 and the checker does not work on the same pages that it did in V3.
The spellchecker can be customized by either creating your own by inheriting from umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.SpellChecker or overriding the implementation of umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker.
The implementation used is specified in the web.config.
Bump for me as well, I'm also getting this error but only in IE. Chrome and Fox seem to be fine but in both of these browsers, the checker stops when it comes to the apostrophe as well. If I remove the apostrophe, the checker will finish going through the document (except in IE, it still gets an error).
Can somebody, anybody please help? Or even explain how to create and implement another spell checker. I downloaded Javascript Spell Checker and want to us that but it has the following files:
.js file
core folder with asp, php, settings, and a few other similar files
dictionary folder with lang-rules and a few text files
extensions folder with a .js file and some folders with a modal and images
themes folder
and a translations folder with .js files for various languages
There has NOT been a working spellchecker in Umbraco since the release of V4.x, the issue has been reported numerous times since 2007. The issue was "closed" without resolution in 2009 due to the lack of functionality between .NET and TinyMCE or something lame and the fact that nobody wanted to take the time to fix it.
With the upgrade to .NET 4 the speller functionality returned but is not usable because it crashes with normal punctuation. The issue has lingered for 2 more years with SEVERAL bug reports and numerous votes (at least 4) on codeplex and numerous threads here, on blogs and other 3rd party sites. To date, nobody on the development team has taken the time to fix, or for that matter even acknowledge the issue as anything more than "low" impact and not assign it. In the meantime we keep churning out new versions of Umbraco that don't have a working spell checker but do have partial functionality for every new acronym based connectivity under the sun.
It is like putting a sunroof and cruise control on a car that has a broken engine. I don't know many folks who manage content that don't RELY on a spellchecker. Why should a content editor need to roundtrip Umbraco content to a 3rd party application, just to check the spelling? It is downright laughable.
Exactly how many votes and complaints does it take to get somebody to take notice and fix the problem? I mean honestly, 4 years and no spellchecker but we had a wonderful one in V3. Nothing like moving backward in the name of progrress. Are we to honestly accept that this is not a real issue and that 4 years and dozens of releases later, the issue is still present? My iPhone checks spelling, the forums I am a membe rof (except this one) check spelling, hell my cat checks spelling...
As the xml generated by this is being sent in the body of a HttpWebRequest therefore the "data" (list of words pass by TinyMCE) DOESN'T need to be Url Encoded.
It is the encoding that is causing the problem as it is converting characters such as apostrophe's into this %27 and so on. The upshot of this is the subsequent parse operation to find the misspelt word fails as it relies on substringing based on a "now" incorrect character count and index (i.e. every url encoded character generates a 2 character offset error).
So, my solution was to create a new handler which inherits umbraco's spell checker :
public class LeightonSpellChecker : umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker
then I override the CheckWords method :
public override SpellCheckerResult CheckWords(string language, string[] words) { XmlDocument document = new XmlDocument(); string data = string.Join(" ", words); string xml = doSpellCheck(language, data); document.LoadXml(xml); var res = new SpellCheckerResult(); foreach (XmlNode node in document.SelectNodes("//c")) { XmlElement element = (XmlElement)node; res.result.Add(data.Substring(Convert.ToInt32(element.GetAttribute("o")), Convert.ToInt32(element.GetAttribute("l")))); } return res; }
doSpellCheck replaces the original call to SendRequest, which is private in the original source:
The only thing left to do to get this working is to register your new handler in the web.config and update your tinyMceConfig.config accordingly. In my case :
I now have an apostrophe proof spell checking. It's just a shame this has been hanging around for so long and it's such an easy fix (1 line of code in core)... for a very important feature. You could go to town if I'm honest and completely rewrite the whole spell check handler... it looks like it could do with some TLC. This does me for now though. Hope it helps other with same problem.
What frustrates me is that so many of these issues are so easy (for backend developers) to fix but the "core team" never gets around to it. The whole "vote it up" paridigm is/was broken from day one. This project is (and has been) broken from a management standpoint and does not appear to be getting better, at least from my persective. I have very critical of the project for a long time. I love umbraco but am constantly frustrated with the process, documentation and this rather bad "our." portal. Honestly, what other content editor are you aware of that does not have a full featured spell checker? It is almost laughable at this point.
So add this hack to one more set of items that has to be recreated every time a site is updated.... good grief. Thanks for the hard work Dave... at least we have a fix even if the core team ignores it.
@William Burnett including comment above and earlier comment. "over a year and several full versions later and no fix...
It is almost comical that a full featured CMS can't do basic spellchecking."
This really is no surprise. There is still no drag and drop for example for basic file management in either the Content Area and Media Library, all the while prettying up the interface w/project Belle. see http://issues.umbraco.org/issue/U4-229 Note the priority is still normal.
HQ loves to go for the fancy features, but often ignores the basics. They have sort of the Steve Jobs / Jonny Ive mentality that they know best. Except Umbraco HQ is no Apple.
The lack of a Spellchecker and drag and drop evidences a tin ear to the needs of editors. It's really unconscionable and completely inexplicable.
Seth, first of all thank you for posting a possible solution... But (respectfully and not directed toward you at all) but who gives a flying rat crap what service umbraco "was" using for spell check. The fact that it "was" using the google service and that is now (long been) defunct only strengthens the point. Here we are nth version later and we still do not have a working spell checker. Moreover, it never properly worked to begin with, even with the google API was active. This is simply luaghable for a "CMS" that is highly leveraged toward the development of sites that are driven by end user content creation and editing. There should be no reason to install a "project" to get this functionality. It should be built into the core of the product. Language is stable, as is the concept of a "spelling checker". This is just one more thank that requires us to hack around under the hood and fix every time there is a version update (another process that is somewhat laughable).
As much as I love the concept of Umbraco and the features that do work, just about everything else surrounding this project is a train wreck. As I have stated numerous times, I have never seen a project of this scope that is so poorly managed or implemented. The "spellcheck" issue is a metaphor for the entire project, from the documentation, through the "our" site, to the asenine "vote it up" method of bug reporting and fixing.
Don't get me wrong, there is clearly plenty of talent, but from this perspective it is being wholy squandered, much of it fumbling with this silly website (again a management issue).
If HQ can't quite manage to follow a convention for installation and breaking changes from version to version or enforce something as simple as config file formatting conventions (delimiter with spacing then the next release, no spacing, then spacing the next release, then no spacing...), do we really expect them to tackle a 6 year old issue that should ALWAYS be on the top of the "to fix if it breaks" list?
I (for the most part) gave up a long time ago. I still use the product for my personal sites but would likely never allow a customer site to be built on it. Every single developer I have introduced to the project has walked away laughing, all of them with basically the same opinion. "Wow looks awesome, but the documentation sucks, the forum site is a disorganized mess and there appears to be little or no actual support from the developers... so no thanks."
Before any of you start the "Don't complain, it is free" or "Where was you last contribution to the project" response, save yourself the trouble and fix the spellchecker instead :)
@William Burnett A very insightful set of comments. We've spent a bloody fortune in time dealing w/changes such as you discussed above. Others include lack of transparency for constraints introduced with new versions, Courier and Concierge failing repeatedly and being fully unable to scale, and failure to insure a reasonable level of backward compatibility. Another metaphor for disorganization was the infamous Unmbraco 5, deep-sixing an entire new version of the software and costing many developers boatloads of $$$$$.
Moreover, TinyMCE is always running several versions behind and limited in scope by the whims of HQ, many TinyMCE features that are available for other CMS products, but excluded from Umbraco by the HQ folks from their perch atop Mt. Olympus.
@William Burnett Just out of curiosity, what do you use for customer sites that you have found to be more robust/better managed (not wanting to move the conversation to a discussion about which CMS is better, just want to know what you are using/finding to work well)?
And I thought this site was bad BEFORE I tried to use it from an iPad. Honestly, at this point all one can do is laugh at the stubborn arrogance of those that drive this project. One can have a more enjoyable experience using healthcare.gov!
In any case, @seth, I am not a developer. I own an IT consulting company. When I contract a site for a customer, the developer uses their platform of choice or the customers platform of choice. Every single one of them has been open to giving Umbraco a try, not a single one has chosen to adopt it as a tool they are willing to use. Every one of them has commented on the poor and very often contradictory documentation, the extremely poor implementation of this site and the overly hands on installation and upgrade process.
I use the project for my personal sites but (as mentioned above) am to the point where I would not trust it for a clients production site. This entire ordeal is a slow motion train wreck.
Still laughing about how bad this site is on a mobile device. It really is the poster child for this entire project and it is rather fitting.
TinyMCE SpellCheck bug
I have come across a bug in the TinyMCE Spellchecker. Was wondering if someone else has come across it as well. I get it when using single quotes and there is a misspelling:
When I copy that error HTML and put that inside an html page I get this:
Can anyone else confirm this bug?
I can confirm this issue as well. I mainly encountered this issue with foreign (non english) characters.
You should vote the bug up here:
http://umbraco.codeplex.com/workitem/27614
Anybody make any progress on this yet? It is somewhat crippling to not have a spellchecker and make me miss V3
the bug exists in version 3 as well. make sure to vote up the item on codeplex.
I have very few problems with the spellcheck in V3... other than false positive like the word "the" and other silliness. It does not choke on the entire page and throw an error thow. I upgraded a few sites to V4 and the checker does not work on the same pages that it did in V3.
Maybe a better 3rd party plugin is needed for V4
Yeah, this bug is also a issue for the. Using Spellchecker with Swedish.
The spellchecker can be customized by either creating your own by inheriting from umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.SpellChecker or overriding the implementation of umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker.
The implementation used is specified in the web.config.
Did anybody ever find a solution to this issue? As I am currently getting the same thing in 4.5.2
I'm running into this problem in v 4.7 as well.... Has anybody managed to get around this at all?
Hi. I got an error on a job server but not at home. "Index and length must refer to a location within the string."
(the job server was installed with Web Platform Installer)
Just bumping this post up again.
Hitting the same issue when using apostrophe's and the content has a spelling error.
eg.
Generates error on spell check :
Doesn't generate error on spell check :
Any solution out there ?
Edit.. just voted this up :
http://umbraco.codeplex.com/workitem/30215
Bump for me as well, I'm also getting this error but only in IE. Chrome and Fox seem to be fine but in both of these browsers, the checker stops when it comes to the apostrophe as well. If I remove the apostrophe, the checker will finish going through the document (except in IE, it still gets an error).
Can somebody, anybody please help? Or even explain how to create and implement another spell checker. I downloaded Javascript Spell Checker and want to us that but it has the following files:
Anything would be helpful! :(
over a year and several full versions later and no fix...
It is almost comical that a full featured CMS can't do basic spellchecking.
I am going to bump this up again:
There has NOT been a working spellchecker in Umbraco since the release of V4.x, the issue has been reported numerous times since 2007. The issue was "closed" without resolution in 2009 due to the lack of functionality between .NET and TinyMCE or something lame and the fact that nobody wanted to take the time to fix it.
With the upgrade to .NET 4 the speller functionality returned but is not usable because it crashes with normal punctuation. The issue has lingered for 2 more years with SEVERAL bug reports and numerous votes (at least 4) on codeplex and numerous threads here, on blogs and other 3rd party sites. To date, nobody on the development team has taken the time to fix, or for that matter even acknowledge the issue as anything more than "low" impact and not assign it. In the meantime we keep churning out new versions of Umbraco that don't have a working spell checker but do have partial functionality for every new acronym based connectivity under the sun.
It is like putting a sunroof and cruise control on a car that has a broken engine. I don't know many folks who manage content that don't RELY on a spellchecker. Why should a content editor need to roundtrip Umbraco content to a 3rd party application, just to check the spelling? It is downright laughable.
Exactly how many votes and complaints does it take to get somebody to take notice and fix the problem? I mean honestly, 4 years and no spellchecker but we had a wonderful one in V3. Nothing like moving backward in the name of progrress. Are we to honestly accept that this is not a real issue and that 4 years and dozens of releases later, the issue is still present? My iPhone checks spelling, the forums I am a membe rof (except this one) check spelling, hell my cat checks spelling...
The bug is also reproducible in 4.7.2
Maybe they'll fix it in v4.8
*waits*
So, after poking around in the umbraco source I tracked it down to 1 line of code in umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker
This, in the private SendRequest method:
As the xml generated by this is being sent in the body of a HttpWebRequest therefore the "data" (list of words pass by TinyMCE) DOESN'T need to be Url Encoded.
It is the encoding that is causing the problem as it is converting characters such as apostrophe's into this %27 and so on. The upshot of this is the subsequent parse operation to find the misspelt word fails as it relies on substringing based on a "now" incorrect character count and index (i.e. every url encoded character generates a 2 character offset error).
So, my solution was to create a new handler which inherits umbraco's spell checker :
then I override the CheckWords method :
doSpellCheck replaces the original call to SendRequest, which is private in the original source:
The only thing left to do to get this working is to register your new handler in the web.config and update your tinyMceConfig.config accordingly. In my case :
In httpHandlers section of web.config:
In handlers section of web.config:
In tinyMceConfig.config :
I now have an apostrophe proof spell checking. It's just a shame this has been hanging around for so long and it's such an easy fix (1 line of code in core)... for a very important feature. You could go to town if I'm honest and completely rewrite the whole spell check handler... it looks like it could do with some TLC. This does me for now though. Hope it helps other with same problem.
Thank you Dave, for posting that brilliant solution. I'd vote it up but I don't have enough Karma yet! You've saved me hours.
@lucyconnuk
Thanks and no problem. Glad it helped you.
Dave
What frustrates me is that so many of these issues are so easy (for backend developers) to fix but the "core team" never gets around to it. The whole "vote it up" paridigm is/was broken from day one. This project is (and has been) broken from a management standpoint and does not appear to be getting better, at least from my persective. I have very critical of the project for a long time. I love umbraco but am constantly frustrated with the process, documentation and this rather bad "our." portal. Honestly, what other content editor are you aware of that does not have a full featured spell checker? It is almost laughable at this point.
So add this hack to one more set of items that has to be recreated every time a site is updated.... good grief. Thanks for the hard work Dave... at least we have a fix even if the core team ignores it.
@William Burnett including comment above and earlier comment. "over a year and several full versions later and no fix... It is almost comical that a full featured CMS can't do basic spellchecking."
This really is no surprise. There is still no drag and drop for example for basic file management in either the Content Area and Media Library, all the while prettying up the interface w/project Belle. see http://issues.umbraco.org/issue/U4-229 Note the priority is still normal.
HQ loves to go for the fancy features, but often ignores the basics. They have sort of the Steve Jobs / Jonny Ive mentality that they know best. Except Umbraco HQ is no Apple.
The lack of a Spellchecker and drag and drop evidences a tin ear to the needs of editors. It's really unconscionable and completely inexplicable.
It is because the previously spellchecker was using a google service that appears to have been discontinued. You can use this spellchecker: http://our.umbraco.org/projects/backoffice-extensions/hunspellchecker.
Seth, first of all thank you for posting a possible solution... But (respectfully and not directed toward you at all) but who gives a flying rat crap what service umbraco "was" using for spell check. The fact that it "was" using the google service and that is now (long been) defunct only strengthens the point. Here we are nth version later and we still do not have a working spell checker. Moreover, it never properly worked to begin with, even with the google API was active. This is simply luaghable for a "CMS" that is highly leveraged toward the development of sites that are driven by end user content creation and editing. There should be no reason to install a "project" to get this functionality. It should be built into the core of the product. Language is stable, as is the concept of a "spelling checker". This is just one more thank that requires us to hack around under the hood and fix every time there is a version update (another process that is somewhat laughable).
As much as I love the concept of Umbraco and the features that do work, just about everything else surrounding this project is a train wreck. As I have stated numerous times, I have never seen a project of this scope that is so poorly managed or implemented. The "spellcheck" issue is a metaphor for the entire project, from the documentation, through the "our" site, to the asenine "vote it up" method of bug reporting and fixing.
Don't get me wrong, there is clearly plenty of talent, but from this perspective it is being wholy squandered, much of it fumbling with this silly website (again a management issue).
If HQ can't quite manage to follow a convention for installation and breaking changes from version to version or enforce something as simple as config file formatting conventions (delimiter with spacing then the next release, no spacing, then spacing the next release, then no spacing...), do we really expect them to tackle a 6 year old issue that should ALWAYS be on the top of the "to fix if it breaks" list?
I (for the most part) gave up a long time ago. I still use the product for my personal sites but would likely never allow a customer site to be built on it. Every single developer I have introduced to the project has walked away laughing, all of them with basically the same opinion. "Wow looks awesome, but the documentation sucks, the forum site is a disorganized mess and there appears to be little or no actual support from the developers... so no thanks."
Before any of you start the "Don't complain, it is free" or "Where was you last contribution to the project" response, save yourself the trouble and fix the spellchecker instead :)
@William Burnett A very insightful set of comments. We've spent a bloody fortune in time dealing w/changes such as you discussed above. Others include lack of transparency for constraints introduced with new versions, Courier and Concierge failing repeatedly and being fully unable to scale, and failure to insure a reasonable level of backward compatibility. Another metaphor for disorganization was the infamous Unmbraco 5, deep-sixing an entire new version of the software and costing many developers boatloads of $$$$$.
Moreover, TinyMCE is always running several versions behind and limited in scope by the whims of HQ, many TinyMCE features that are available for other CMS products, but excluded from Umbraco by the HQ folks from their perch atop Mt. Olympus.
@William Burnett Just out of curiosity, what do you use for customer sites that you have found to be more robust/better managed (not wanting to move the conversation to a discussion about which CMS is better, just want to know what you are using/finding to work well)?
And I thought this site was bad BEFORE I tried to use it from an iPad. Honestly, at this point all one can do is laugh at the stubborn arrogance of those that drive this project. One can have a more enjoyable experience using healthcare.gov!
In any case, @seth, I am not a developer. I own an IT consulting company. When I contract a site for a customer, the developer uses their platform of choice or the customers platform of choice. Every single one of them has been open to giving Umbraco a try, not a single one has chosen to adopt it as a tool they are willing to use. Every one of them has commented on the poor and very often contradictory documentation, the extremely poor implementation of this site and the overly hands on installation and upgrade process.
I use the project for my personal sites but (as mentioned above) am to the point where I would not trust it for a clients production site. This entire ordeal is a slow motion train wreck.
Still laughing about how bad this site is on a mobile device. It really is the poster child for this entire project and it is rather fitting.
is working on a reply...