call_user_func_array() error

yngens - September 23, 2007 - 10:30
Project:Wordfilter
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:dwees
Status:duplicate
Description

when going to admin/settings/filters/1/configure it gives an error:

warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'wordfilter' was given in /home/mysite/public_html/alfa/includes/form.inc on line 217.

#1

yngens - October 17, 2007 - 22:53

same error message here:

warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'wordfilter' was given in /home/mysite/public_html/includes/form.inc on line 217.

#2

yngens - October 19, 2007 - 04:30

i did not notice that i was replying to my own post, sorry. nevertheless, the issue is there. could the module maintainer take a look at this, please.

#3

dwees - October 19, 2007 - 07:13
Assigned to:Anonymous» dwees

Try the attached patch.

Dave

AttachmentSize
wordfilter.module.patch 1.09 KB

#4

yngens - October 20, 2007 - 22:48

application of the patch against 5.x-1.x-dev gives:

<?php
patching file wordfilter
.module
Hunk
#1 FAILED at 186.
Hunk #2 FAILED at 198.
2 out of 2 hunks FAILED -- saving rejects to file wordfilter.module.rej
?>

#5

dwees - October 20, 2007 - 23:46

Try to do the patch manually, it's pretty small. Probably there are some small differences between what I started with, and what the module is expecting. I used cygwin to create the patch (and I had renamed the original file to do this) so could that also be the problem?

Dave

#6

yngens - October 21, 2007 - 22:30

i have manually applied the patch and it gives the error:

Fatal error: Call to undefined function: wordfilter_filter_form() in /home/mysite/public_html/sites/all/modules/wordfilter/wordfilter.module on line 196

#7

dwees - October 22, 2007 - 12:04

Okay try this instead. Using the original file on line 194 replace:

return drupal_get_form('wordfilter', $form);

with

$form;

It doesn't really matter anyway since the settings for this module are under admin/settings/wordfilter anyway, this form is just a placeholder telling you to go look at the administration settings form.

Dave

#8

budda - October 22, 2007 - 16:03

I made the changes in comment #7 and the module now works in D5.

#9

dwees - October 25, 2007 - 10:34

It should actually be:

return $form;

I think, but it doesn't really matter, whatever works.

Dave

#10

hunmonk - December 31, 2007 - 20:54
Status:active» duplicate

http://drupal.org/node/166215

 
 

Drupal is a registered trademark of Dries Buytaert.