Fatal error: Only variables can be passed by reference in \sites\all\modules\wymeditor\wymeditor.install on 41
zmove - August 19, 2008 - 07:10
| Project: | WYMeditor |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hi,
Just install Wymeditor on a drupal 6.4 installation, and then, when I go to the input format page, I get the fatal error in the title.
any idea ?

#1
I'm getting the same error. Any progress on this?
#2
I have the same error.
I suppose I've found the error !
File : wymeditor.install on WYMeditor module
Function : wymeditor_unistall
function wymeditor_unistall() {
drupal_uninstall_schema('wymeditor');
$filters = filter_formats();
foreach ($filters as $filter) {
if ($filter->name == 'WYMeditor') {
filter_admin_delete_submit(NULL, array('format' => $filter->format));
}
}
The second parameter of function filter_admin_delete_submit must be a reference.
So you just have to add a & above the second argument :
function wymeditor_unistall() {
drupal_uninstall_schema('wymeditor');
$filters = filter_formats();
foreach ($filters as $filter) {
if ($filter->name == 'WYMeditor') {
$form_state = array('format' => $filter->format);
filter_admin_delete_submit(NULL, &$form_state);
}
}
}
It seems to solve this issue for me. But I do not spend time to have a serious look on this function.
Furthermore, there is a typo in the function name : the correct name is uninstall and not unistall.
Just correct this type and the WYMeditor module will appear in the desinstall module page.
#3
I wrote a bug report for the hook_uninstall typo : http://drupal.org/node/304314
#4
Thanks for the help.
What frightens me is that this means the module as not even been basic tested since the update script throw that error right away and that is a logical error... so that script was never ran ..
Ouch ....
This module is really interesting and maybe do we need more testers or reviewers .. (and unit tests :) )
Thanks a lot for the time of everybody anyway.
#5
Right !
I am ok to help for this interesting piece of software. I am currently reading Drupal documentation for that goal.
#6
I'm interested in helping test etc., but it would be good to know what the plans are, if the maintainer(s?) is/are working on it, etc.
#7
I agree.
Functionnal and unit tests would be great and this editor must become the default content editor. He does things the right way (tm)
Technical editors more format oriented (not formatting mind you) can be useful like markitup (http://markitup.jaysalvat.com/examples/) but Wysiwym should be all the end user / content producer see.
#8
This problem is corrected.
Thnaks
#9
Glad to see you are still on the project.
Does that mean we could expect some update with the new version of WYSIWYM ? :)
Do you need help for testing or structured bug reports ?
I am not sure I can help with the code since I am really new to PhP and Drupal but ...
#10
Agree with #9. I tried the sept-22 dev release, installation ok, configuring and actually using the editor throws some foreach() errors, but basically works. I'm assuming you are aware of these errors, or would it be helpful to post them? (Or, maybe the errors are actually i18n related in which case I shouldn't bother you with it).
Keep up the good work.
#11
I'm getting the same warning as Arjan, but it seems to work. I've tested and tried a lot of WSYWIG editors and I think this is the best, by far. I'd love to see this project pushed forward. I'm not a hard core developer, but I'd be willing to help in testing...
#12
As for me I can help on this module !
I am a professional software designer. PHP is not my favorite programming langage but I can help.
#13
Automatically closed -- issue fixed for two weeks with no activity.