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

iva2k’s picture

Status: Active » Postponed (maintainer needs more info)

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

W.M.’s picture

I use Wysiwyg 6.x-2.1 but still got that error. Both modules have a weight value of zero.

iva2k’s picture

Your 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?

W.M.’s picture

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

iva2k’s picture

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

W.M.’s picture

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

iva2k’s picture

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

iva2k’s picture

Given 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!

iva2k’s picture

Status: Postponed (maintainer needs more info) » Fixed

Been awhile, I consider it fixed. Please reopen if you have new information on the issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.