Hello!
I got an error upon enabling this module:
Fatal error: Call to undefined function wysiwyg_get_path() in home/me/public_html/me_com/sites/all/modules/wysiwyg_spellcheck/wysiwyg_spellcheck.module on line 11
I had to remove // from line 10 and add // to line 11 in order to make the module work:
//define('TINYMCE_SPELLCHECKER_DEFAULT_PATH', 'sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/spellchecker');
define('TINYMCE_SPELLCHECKER_DEFAULT_PATH', wysiwyg_get_path('tinymce') . '/jscripts/tiny_mce/plugins/spellchecker');
Changed to:
define('TINYMCE_SPELLCHECKER_DEFAULT_PATH', 'sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/spellchecker');
//define('TINYMCE_SPELLCHECKER_DEFAULT_PATH', wysiwyg_get_path('tinymce') . '/jscripts/tiny_mce/plugins/spellchecker');
Works fine so far! Please fix this issue and thanks for the nice work!
Comments
Comment #1
iva2k commentedwysiwyg_get_path() is provided by Wysiwyg API, which is a requirement, so wysiwyg_get_path() should exist.
1. What is your version of Wysiwyg module?
2. Can you try the latest Wysiwyg module and restore wysiwyg_get_path() in wysiwyg spellcheck code - Does it work?
3. If still not working, can you post here the weight of wysiwyg module and weight of wysiwyg spellcheck module (it is found in {system} database table)?
Comment #2
W.M. commentedI use Wysiwyg 6.x-2.1 but still got that error. Both modules have a weight value of zero.
Comment #3
iva2k commentedYour wysiwyg version is up to date, wysiwyg_get_path() is there, and based on weight value should be loaded. It beats me why you are getting 'undefined function' error. Let's dig at other angles:
1. What is your PHP version?
2. Drupal core version? Any core customizations or patches?
3. Are you using any PHP accelerators? What version?
4. Did you try clearing all caches?
Comment #4
W.M. commentedWhat happened is that I had installed version 6.x-1.2 of this module first. It installed fine but TinyMCE failed to load when it was enabled inside Wysiwyg. I disabled the module, deleted the files and uploaded the 6.x-1.x-dev version, ran update.php and re-enabled the dev version, then the above mentioned error occurred.
I am using drupal 6.15. I hope this info would help you.
Comment #5
iva2k commentedThanks - you answered one. Still need the other info:
1. What is your PHP version?
2.
Drupal core version?Any core customizations or patches?3. Are you using any PHP accelerators? What version?
4. Did you try clearing all caches?
Looks like you ran update before enabling the module, which makes no difference. You need to run update.php after enabling the module (update is not under question here, but it will also clear the caches which might be needed).
Comment #6
W.M. commentedHere is more info:
PHP version 5.2.5
no core patches if what you mean is customizations of drupal core modules' files
I cannot provide answer regarding accelerators
I enabled the module after running update.php
I did not clear the caches
Token, views, wysiwyg were on ...
Comment #7
iva2k commentedYou need to run update.php AFTER enabling the module (update is not under question here, but it will also clear the caches which might be needed).
Comment #8
iva2k commentedGiven that the problem you saw is in coming up with a good default for the library location, I changed the 6.x-1.x-dev to use a function for that, so it can be guarded against such problems. It still beats me what was causing 'undefined function', but new code should not have this error happening.
Please check if the problem goes away. Thanks for hanging on and providing all the information!
Comment #9
iva2k commentedBeen awhile, I consider it fixed. Please reopen if you have new information on the issue.