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

jdlind38 - August 31, 2008 - 12:08

I'm getting the same error. Any progress on this?

#2

Domsou - September 4, 2008 - 16:31

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

Domsou - September 5, 2008 - 09:41

I wrote a bug report for the hook_uninstall typo : http://drupal.org/node/304314

#4

Annakan - September 7, 2008 - 19:54

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

Domsou - September 7, 2008 - 20:18

Right !

I am ok to help for this interesting piece of software. I am currently reading Drupal documentation for that goal.

#6

ArjanLikesDrupal - September 7, 2008 - 20:41

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

Annakan - September 11, 2008 - 12:44

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

fall_0ut - September 21, 2008 - 14:53
Status:active» fixed

This problem is corrected.

Thnaks

#9

Annakan - September 23, 2008 - 20:30

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

ArjanLikesDrupal - September 23, 2008 - 21:30

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

jdlind38 - September 24, 2008 - 01:14

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

Domsou - September 24, 2008 - 12:57

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

Anonymous (not verified) - October 8, 2008 - 13:01
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.