warning: call_user_func_array() [function.call-user-func-array]

mikestefff - May 11, 2009 - 01:55
Project:AJAX Comments
Version:6.x-1.7
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

Error thrown upon submitting a comment. Comments are posted though. I'm using the dev because there was a similar bug in the supported release but comments wouldn't even post with that one.

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'get_form_token' was given in /var/www/includes/menu.inc on line 348.

#1

mikestefff - May 11, 2009 - 01:56

Also, when trying to post another comment without reloading the page, it shows nothing but "null" when clicking "Post Comment"

#2

neochief - May 11, 2009 - 08:11

Are you sure that it's related to ajax_comments? I didn't ever heared and experienced such error before. Did you installed some contrib recently?

#3

mikestefff - May 11, 2009 - 08:53

Yes of course it is: warning: array_shift() [function.array-shift]: The argument should be an array in /var/www/sites/all/modules/ajax_comments/ajax_comments.module on line 109. Referencing ajax_comments.module gave it away.

I just disabled and reenabled. Adding single comments seems to work fine. But trying to add more than without reloading the page throws the error above. Also, when trying to add more than one with a page reload, the wysiwyg editor is gone. I'm assuming it's because of the dynamic form creation.

#4

neochief - May 11, 2009 - 12:17
Status:active» postponed (maintainer needs more info)

Actually, array_shift() errors don't mean anything, it's only way in which some other errors are brearing the posting routine. The real problem somewhere underneath. Sorry, but I'm afraid, you should debug this by yourself, because I can't reproduce it.

#5

mikestefff - May 11, 2009 - 22:45

Think it could be because of exposed comment controls?

#6

mikestefff - May 11, 2009 - 22:49

No that isn't it.

Well it's being quite strange now. Sometimes the new comments show, sometimes they don't. Repeat comments seem to never work. I don't know what else would be causing this to happen.

#7

Babalu - May 12, 2009 - 20:15

same error here. i'm using hide submit button too

#8

makopolok - June 4, 2009 - 00:02

same error

#9

mikestefff - June 5, 2009 - 16:15

Much better ajax comments with Popups API - http://drupal.org/node/459222

You can also get it to work with comment replys, edits, deletes, etc...

#10

ltwinner - July 20, 2009 - 20:23

im having the same error with - warning: array_shift() [function.array-shift]: The argument should be an array in /var/www/drupal/sites/all/modules/ajax_comments/ajax_comments.module on line 109.

It happens when I try and reply to a comment. If I just make a comment on the node itself there is no problem.

The Popup API is not an option I think, as it is not user friendly to have to comment through popups. It should be a simple process with the comment form on the page imo.

#11

Vinc - August 3, 2009 - 10:09
Version:6.x-1.x-dev» 6.x-1.7

I've got the same problem that ltwinner described.

Error Message is:

    * warning: array_shift() [function.array-shift]: The argument should be an array in /drupal/sites/all/modules/ajax_comments/ajax_comments.module on line 109.
    * warning: Invalid argument supplied for foreach() in /data/apache/users/kilu.de/ttp/www/drupal/sites/all/modules/cck/content.module on line 1284.

Will try to get some more information, because I really need this module!

Edit: I just noticed that the second error with the CCK module is not showing up when i'm trying to save the comment directly, without preview. The variable $args used on Line 108 is actually empty when I try to reply to a comment. So there has to be an error with the stored form in the cache.

Edit2: I tried out the dev version and it's working for me. There has to be a difference between the two versions concerning the cache.

#12

neochief - August 25, 2009 - 23:37
Status:postponed (maintainer needs more info)» duplicate

#412368: array_shift error in ajax_comments.module line 118

 
 

Drupal is a registered trademark of Dries Buytaert.