Opened 18 years ago
Closed 17 years ago
#3857 closed defect (bug) (fixed)
TinyGoogleSpell fails
Reported by: | Nazgul | Owned by: | Nazgul |
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | normal | Version: | 2.2 |
Component: | TinyMCE | Keywords: | has-patch |
Focuses: | Cc: |
Description
The TinyMCE spellcheck plugin fails when it tries to use google, with the message "Could not execute AJAX call, server didn't return valid a XML." (which in itself could use some spellchecking)
A network sniffer shows that it is trying to post to http://www.google.com/tbproxy/spell?lang=en, but that returns a 302 to https://www.google.com/tbproxy/spell?lang=en (notice the https)
It seems it's trying to interpret the 302 page as XML, which obviously fails.
Attachments (3)
Change History (18)
#4
follow-up:
↓ 5
@
18 years ago
I just ran a sniff (WireShark), and the spell check only does port 80 with my blog host. It does not port 80 to any other servers.
#5
in reply to:
↑ 4
@
18 years ago
Replying to novasource:
I just ran a sniff (WireShark), and the spell check only does port 80 with my blog host. It does not port 80 to any other servers.
Oops, I posted this to the wrong ticket. While it's kind of relevant, I meant it for 3857.
#6
@
18 years ago
I did some more testing/debugging.
My error log showed:
[28-Feb-2007 23:15:58] PHP Notice: Use of undefined constant PSPELL_FAST - assumed 'PSPELL_FAST' in D:\Development\WordPress\SVN\wp-includes\js\tinymce\plugins\spellchecker\config.php on line 13 [28-Feb-2007 23:15:58] PHP Notice: Undefined index: mode in D:\Development\WordPress\SVN\wp-includes\js\tinymce\plugins\spellchecker\tinyspell.php on line 36 [28-Feb-2007 23:15:58] PHP Notice: Undefined index: spelling in D:\Development\WordPress\SVN\wp-includes\js\tinymce\plugins\spellchecker\tinyspell.php on line 37 [28-Feb-2007 23:15:58] PHP Notice: Undefined index: jargon in D:\Development\WordPress\SVN\wp-includes\js\tinymce\plugins\spellchecker\tinyspell.php on line 38 [28-Feb-2007 23:15:58] PHP Notice: Undefined index: encoding in D:\Development\WordPress\SVN\wp-includes\js\tinymce\plugins\spellchecker\tinyspell.php on line 39 [28-Feb-2007 23:15:58] PHP Notice: Undefined index: sg in D:\Development\WordPress\SVN\wp-includes\js\tinymce\plugins\spellchecker\tinyspell.php on line 40 [28-Feb-2007 23:15:58] PHP Notice: Undefined property: errorMsg in D:\Development\WordPress\SVN\wp-includes\js\tinymce\plugins\spellchecker\tinyspell.php on line 86 [28-Feb-2007 23:16:08] PHP Warning: Cannot modify header information - headers already sent by (output started at D:\Development\WordPress\SVN\wp-includes\js\tinymce\plugins\spellchecker\config.php:13) in D:\Development\WordPress\SVN\wp-includes\js\tinymce\plugins\spellchecker\tinyspell.php on line 111
After I upgraded to version 1.0.3.1 of tinyspell (patch attached) I "upgraded" to this list of errors:
[28-Feb-2007 23:24:59] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: no SSL support in this build in D:\Development\WordPress\SVN\wp-includes\js\tinymce\plugins\spellchecker\classes\TinyGoogleSpell.class.php on line 82 [28-Feb-2007 23:24:59] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to www.google.com:443 in D:\Development\WordPress\SVN\wp-includes\js\tinymce\plugins\spellchecker\classes\TinyGoogleSpell.class.php on line 82 [28-Feb-2007 23:24:59] PHP Fatal error: Call to undefined function: curl_init() in D:\Development\WordPress\SVN\wp-includes\js\tinymce\plugins\spellchecker\classes\TinyGoogleSpell.class.php on line 95
So I managed to change and reduce the number of errors, but it's still not working. But I have some more ideas...
#7
@
18 years ago
- Keywords has-patch dev-feedback added
I got it to work (sort of).
I couldn't get fsockopen with ssl to work on Windows, so I installed curl on my machine and made a small change to the code that it will use curl instead of fsockopen when available. This makes it work on Windows as long as curl is installed, but it will still fail if it isn't.
After that change I encountered another issue. The new spellcheck version introduces a dependency on the mbstring extension (which I ofcourse haven't installed) so I made a small change so it will use mb_substr when available or fall back to normal substr when it isn't.
After that spellcheck was working for me. I attached another patch which upgrades spellcheck to 1.0.3.1, but also contains my changes.
Only downside is that it will still fail on Windows servers without curl. Anyone have a solution for that?
#8
follow-up:
↓ 9
@
18 years ago
What's your version of PHP? I'm seeing numerous reports of problems with some versions of PHP 4.3.x on Windows. Apparently there are/were bugs in many builds that require replacing various DLLs to do fsockopen to ssl connections.
I'm not seeing any PHP5 issues along these same lines, however.
#9
in reply to:
↑ 8
@
18 years ago
Replying to Otto42:
What's your version of PHP?
From my phpinfo():
PHP Version 4.4.5 System Windows NT AMD3500 5.1 build 2600 Build Date Feb 13 2007 22:09:09 Server API CGI/FastCGI
#10
@
18 years ago
[4985] updates spellechecker to 1.0.3.1. Let's base patches off of that and get fixes upstream to moxie.
#13
@
18 years ago
- Keywords dev-feedback removed
- Owner changed from andy to Nazgul
- Status changed from new to assigned
Replying to Nazgul:
Submitted the bugs upstream:
https://sourceforge.net/tracker/?func=detail&atid=635682&aid=1691693&group_id=103281
This one has been fixed upstream. See:
http://tinymce.svn.sourceforge.net/viewvc/tinymce/spellchecker_php/trunk/classes/TinyGoogleSpell.class.php?r1=149&r2=247
I've attached a diff with those changes for inclusion in Wordpress.
Could we get this in for 2.2?
A newer version of the TinyMCE spell checker exists which may eliminate this issue.
http://prdownloads.sourceforge.net/tinymce/tinymce_spellchecker_php_1_0_3_1.zip?download
It appears to use a more direct approach instead of using the HttpClient class (which does not work).