Simple Machines Community Forum

SMF Development => Bug Reports => Topic started by: m4z on October 03, 2019, 04:17:24 PM

Title: enchant spell checking not working with (almost) current 2.1 HEAD
Post by: m4z on October 03, 2019, 04:17:24 PM
I'm using the HEAD from 2019-09-23 (https://github.com/SimpleMachines/SMF2.1/commit/8079796516a5f2944fea476a1fd04a0bda6d1fb7).

When I aptitude install enchant php5-enchant (Debian 8), restart my webserver, enable the then-newly-available option "Forum → Posts and Topics → Post Settings → Enable spell checking", begin a new post and press "Spell check", a blank window opens and my post is submitted as if I had pressed "Post". Nothing in the Error log, lighttpd access/error logs or postgres logs.
Title: Re: enchant spell checking not working with (almost) current 2.1 HEAD
Post by: Arantor on October 03, 2019, 04:19:01 PM
Did you install a dictionary? More specifically the dictionary that would match the language pack you have installed?
Title: Re: enchant spell checking not working with (almost) current 2.1 HEAD
Post by: m4z on October 03, 2019, 05:20:41 PM
Good catch, but that doesn't seem to be the whole problem, the behavior is still very interesting.

My forum is english/german. An english dictionary ("hunspell-en-us") was installed by default. I now manually installed "hunspell-de-de" too.

Before, with only the english dictionary, the popup window really was just an empty white window. Now, the popup window does have contents, but spell checking only seems to work sometimes: First, as you kinda implied, spell checking only seems to work for the language that is selected in the UI at that moment. But that's not all.

When the first word is spelled correctly, the text will just be posted (and the quick reply field emptied as before (but I forgot to mention it before ;))), and the popup is still kinda empty (three empty text fields).
When the first word is spelled incorrectly and (<assumption0>) the spellchecker has a suggestion (</assumption>), the post is submitted in the background, but I can actually begin spellchecking my text. When I finish spellchecking the complete text, my corrected text is re-inserted into the quick reply field again (during spellchecking, it's empty).

[0]: I assume this because f.e. it doesn't work (only displays the three empty text fields) in cross-language situations (UI set to english, text in german, or vice versa).
Title: Re: enchant spell checking not working with (almost) current 2.1 HEAD
Post by: Arantor on October 03, 2019, 05:43:33 PM
Errors in the console? In 2.0 (and if memory serves it's not wildly different in 2.1), you get the popup and if there are no spelling mistakes, you get a JS alert saying so, and when you acknowledge it, it closes both the alert and the popup.
Title: Re: enchant spell checking not working with (almost) current 2.1 HEAD
Post by: m4z on October 03, 2019, 05:51:49 PM
No. Still like I posted above: nothing at all, not in the SMF Admin Error log, not in the lighttpd logs, nor the postgres logs.

I got no such JS popup in the problematic case (only after successfully finishing the spellcheck I got one that worked like you describe; don't remember what it said, though).
Title: Re: enchant spell checking not working with (almost) current 2.1 HEAD
Post by: Arantor on October 03, 2019, 06:04:36 PM
I wasn't asking you to check those logs, please check the browser console for JS errors. It's very likely the issue you have is some bad JavaScript.
Title: Re: enchant spell checking not working with (almost) current 2.1 HEAD
Post by: m4z on October 04, 2019, 06:40:47 PM
Ah, I misread... late night brain... There are no errors AFAICT, see attachment.
Title: Re: enchant spell checking not working with (almost) current 2.1 HEAD
Post by: shawnb61 on October 25, 2019, 07:29:03 PM
Logged here:
https://www.simplemachines.org/community/index.php?topic=569909.0
Title: Re: enchant spell checking not working with (almost) current 2.1 HEAD
Post by: m4z on October 26, 2019, 01:24:10 AM
Did you mean https://github.com/SimpleMachines/SMF2.1/issues/5847 ? ;)
Title: Re: enchant spell checking not working with (almost) current 2.1 HEAD
Post by: shawnb61 on October 26, 2019, 10:09:04 AM
Yep!