Hi,

When I want to look at the list of my subscriptions I get the following message:
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'simplenews_admin_list' was given in .../includes/form.inc on line 218.

And no subscriptions are displayed!
I looked up the function in form.inc and it has something to do with the subscription form, but I have no idea what is wrong with that form.
Anybody has a clue?

Comments

thomas74’s picture

Status: Active » Closed (fixed)

cleaning up cache solved the problem.

aschiwi’s picture

For me it's this message:
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'simplenews_block_form_18' was given in /srv/www/vhosts/humanagement.de/httpdocs/includes/form.inc on line 218.

And clearing cache does not solve the problem. It concerns pages with subscriptions blocks on them and the error is only visible for anonymous users.

sutharsan’s picture

Simplenews 5.x-1.2 is not supported. please update to the latest (stable) version.

aschiwi’s picture

Version: 5.x-1.2 » 5.x-1.5

Sorry, I am running the latest version, forgot to change that in the issue settings. Any ideas?

aschiwi’s picture

Status: Closed (fixed) » Active

I really can't figure out the problem here. Since 5.x-1.5 has been out since June of last year, I have been using it without any problems. Now on a page with the the newsletter subscribe block, anonymous user gets the following error and no email field is displayed.

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'simplenews_block_form_28' was given in /srv/www/vhosts/humanagement.de/httpdocs/includes/form.inc on line 218.

I'm not too sure when this happened, since I don't surf my site as anonymous that much. I do think it happened with my last upgrading procedure. I upgraded to Drupal 5.15 and I updated Simplenews Template. I do have a custom module extension which shows me the number of subscribers per newsletter and sends me an email when somebody subscribed or unsubscribed. But I still get the error after uninstalling that module.

Hope you can help,
Anja

sutharsan’s picture

@aschiwi: the original issue is about 'simplenews_admin_list' not 'simplenews_block_form_...'. It may look the same, but it is a different thing.

You may have changed the taxonomy term of your newsletter. simplenews_block_form_28 expects the newsletter term id to be '28'.
You can try to re-install (disable + enable) the subscription block.

aschiwi’s picture

@Sutharsan, okay sorry.
I already disabled and enabled the subscription blocks. I did not change the name for the term either... I guess I'm just not gonna provide a subscription block then.

Thanks for trying to help :-)

aschiwi’s picture

I tried to tackle this issue again and found the solution. Within one of the subscription blocks I un-checked the "Display subscription form" and got a link to newsletter/subscriptions for anonymous user and it turned out that were 2 newsletters available for subscription but I actually have 5. I tried the subscription block on those two and it worked on there without an error message.

Since simplenews doesn't provide a way to choose whether a newsletter should be subscribable or not, I had my trace. Turns out this was a problem with another module - Taxonomy Access. Anonymous didn't have the "show all" box checked for those newsletters that didn't work. Since the content was visible anyway, I had a real hard time finding this.

aschiwi’s picture

Status: Active » Closed (fixed)
avpaderno’s picture

Title: warning-message: call_user_func_array() error in includes/form.inc on line 218 » Wrong argument for call_user_func_array()
Status: Closed (fixed) » Active
avpaderno’s picture

Status: Active » Closed (fixed)