Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Seth Niemuth 275 posts 397 karma points
    Jul 28, 2010 @ 15:43
    Seth Niemuth
    0

    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:

  • Seth Niemuth 275 posts 397 karma points
    Jul 30, 2010 @ 17:50
    Seth Niemuth
    0

    Can anyone else confirm this bug?

  • Halldór Hrafn Gíslason 30 posts 50 karma points
    Aug 03, 2010 @ 18:44
    Halldór Hrafn Gíslason
    0

    I can confirm this issue as well. I mainly encountered this issue with foreign (non english) characters.

  • Seth Niemuth 275 posts 397 karma points
    Aug 04, 2010 @ 14:48
    Seth Niemuth
    0

    You should vote the bug up here:

    http://umbraco.codeplex.com/workitem/27614

  • William Burnett 213 posts 262 karma points
    Aug 25, 2010 @ 13:54
    William Burnett
    0

    Anybody make any progress on this yet? It is somewhat crippling to not have a spellchecker and make me miss V3

  • Seth Niemuth 275 posts 397 karma points
    Aug 25, 2010 @ 15:31
    Seth Niemuth
    0

    the bug exists in version 3 as well. make sure to vote up the item on codeplex.

  • William Burnett 213 posts 262 karma points
    Aug 25, 2010 @ 15:51
    William Burnett
    0

    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

  • GLindqvist 13 posts 13 karma points
    Sep 19, 2010 @ 01:10
    GLindqvist
    0

    Yeah, this bug is also a issue for the. Using Spellchecker with Swedish.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Sep 19, 2010 @ 04:30
    Aaron Powell
    0

    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.

  • Probocop 51 posts 71 karma points
    Jun 20, 2011 @ 10:30
    Probocop
    0

    Did anybody ever find a solution to this issue? As I am currently getting the same thing in 4.5.2

  • Braydie 148 posts 346 karma points
    Jul 20, 2011 @ 15:22
    Braydie
    0

    I'm running into this problem in v 4.7 as well.... Has anybody managed to get around this at all?

  • rjohannesson 2 posts 22 karma points
    Jul 25, 2011 @ 15:44
    rjohannesson
    0

    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)

     

  • Dave Forster 28 posts 74 karma points
    Sep 19, 2011 @ 14:08
    Dave Forster
    0

    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 :

    The quick brown fox jumped over the lazy dog, he's my favrite

    Doesn't generate error on spell check :

    The quick brown fox jumped over the lazy dog, hes my favrite

    Any solution out there ?

     

    Edit.. just voted this up :

    http://umbraco.codeplex.com/workitem/30215

     

     

  • Sierra Santiago 33 posts 53 karma points
    Jan 12, 2012 @ 18:25
    Sierra Santiago
    0

    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
    Knowing these, how could I use these?

    Anything would be helpful! :( 
  • William Burnett 213 posts 262 karma points
    Jun 09, 2012 @ 04:19
    William Burnett
    0

    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.

  • William Burnett 213 posts 262 karma points
    Jun 12, 2012 @ 21:40
    William Burnett
    0

    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...

     

     

  • Simon T 1 post 21 karma points
    Jun 13, 2012 @ 16:29
    Simon T
    0

    The bug is also reproducible in 4.7.2

  • Dave Forster 28 posts 74 karma points
    Jun 13, 2012 @ 16:31
    Dave Forster
    0

    Maybe they'll fix it in v4.8

    *waits*

  • Dave Forster 28 posts 74 karma points
    Jul 17, 2012 @ 10:33
    Dave Forster
    100

    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:

    string s = string.Format("<?xml version=\"1.0\" encoding=\"utf-8\" ?><spellrequest textalreadyclipped=\"0\" ignoredups=\"0\" ignoredigits=\"1\" ignoreallcaps=\"1\"><text>{0}</text></spellrequest>", HttpContext.Current.Server.UrlEncode(data));

    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:

    private static string doSpellCheck(string lang, string data)
    {
         string requestUriString = string.Format("https://www.google.com/tbproxy/spell?lang={0}&hl={0}", lang);
         string requestXml = string.Format("<?xml version=\"1.0\" encoding=\"utf-8\" ?><spellrequest textalreadyclipped=\"0\" ignoredups=\"0\" ignoredigits=\"1\" ignoreallcaps=\"1\"><text>{0}</text></spellrequest>", data);
    
         byte[] buffer = Encoding.UTF8.GetBytes(requestXml);
         WebClient wc = new WebClient();
         wc.Headers.Add("Content-Type", "text/xml");
         byte[] response = wc.UploadData(requestUriString, "POST", buffer);
         return Encoding.UTF8.GetString(response);
    
    }

    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:

    <add verb="GET,HEAD,POST" path="LeightonSpellChecker.ashx" type="Leighton.Web.handlers.LeightonSpellChecker" />

    In handlers section of web.config:

    <add verb="GET,HEAD,POST" preCondition="integratedMode" name="SpellChecker" path="LeightonSpellChecker.ashx" type="Leighton.Web.handlers.LeightonSpellChecker" />

    In  tinyMceConfig.config :

    <customConfig>
        <config key="entity_encoding">raw</config>
        <config key="spellchecker_rpc_url">LeightonSpellChecker.ashx</config>
    </customConfig>

     

    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.

  • lucyconnuk 7 posts 28 karma points
    Apr 16, 2013 @ 12:57
    lucyconnuk
    0

    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.

  • Dave Forster 28 posts 74 karma points
    Apr 16, 2013 @ 13:09
    Dave Forster
    0

    @lucyconnuk

    Thanks and no problem. Glad it helped you.

    Dave

  • William Burnett 213 posts 262 karma points
    Apr 16, 2013 @ 17:54
    William Burnett
    0

    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.

     

  • Richard Barg 358 posts 532 karma points
    Feb 05, 2014 @ 00:25
    Richard Barg
    0

    @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 Niemuth 275 posts 397 karma points
    Feb 05, 2014 @ 15:07
    Seth Niemuth
    0

    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.

  • William Burnett 213 posts 262 karma points
    Feb 06, 2014 @ 00:10
    William Burnett
    0

    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 :) 

     

     

  • Richard Barg 358 posts 532 karma points
    Feb 06, 2014 @ 00:45
    Richard Barg
    0

    @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.

  • Seth Niemuth 275 posts 397 karma points
    Feb 06, 2014 @ 01:19
    Seth Niemuth
    0

    @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)?

  • William Burnett 213 posts 262 karma points
    Feb 06, 2014 @ 05:18
    William Burnett
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft