hello,

whenever i try to make an argument in my views i have this error:

warning: Invalid argument supplied for foreach() in /home/pyraef3b/public_html/3alamtaney.com/3alamtaney/includes/form.inc on line 1213.
Backtrace:
form_type_checkboxes_value(array)[form.inc:1020];
._form_builder_handle_input_element(array)[form.inc:889];
..form_builder(array)[form.inc:930];
...form_builder(array)[form.inc:930];
....form_builder(array)[form.inc:930];
.....form_builder(array)[form.inc:930];
......form_builder(array)[form.inc:170];
.......drupal_process_form_new(array)[form.inc:70];
........_drupal_build_form(array)[views.module:1150];
.........drupal_build_form(array)[ajax.inc:128];
..........views_ajax_form_wrapper(array)[admin.inc:1723];
...........views_ui_ajax_form(array)[?:?];
............call_user_func_array(array)[menu.inc:348];
.............menu_execute_active_handler(a:0:{})[index.php:18];
..............index.php

any clue what this could be??

CommentFileSizeAuthor
#14 backtrace.txt44.17 KBdemonrage
#10 backtrace.txt296.58 KBdemonrage
#7 view.txt14.28 KBdemonrage
#4 view.txt11.82 KBdemonrage

Comments

dawehner’s picture

Perhaps it would help to post a backtrace with arguments.

demonrage’s picture

the backtrace is already posted. and any argument do this problem.

dawehner’s picture

The arguments/variables of the function calls would be helpful.

demonrage’s picture

StatusFileSize
new11.82 KB

the arguments are
user:uid
user:name
user relationships: requester user

every one tried seperatly and they all give the same error.

ACTION TO TAKE IF ARGUMENT IS NOT PRESENT: the argument have (Provide default argument)
Provide default argument options: User ID from logged in user
Validator options: basic validation

and here is attachment of the view, i think it will not be able to be imported because of the error

demonrage’s picture

Status: Postponed (maintainer needs more info) » Active

also i has noted these bugs in the google crome inspector:

Failed to load resource: the server responded with a status of 500 (Internal Server Error):
admin/build/views/ajax/config-item/my_wall/default/field/count

Failed to load resource: the server responded with a status of 500 (Internal Server Error):
admin/build/views/ajax/preview/my_wall

my_Wall is my user view

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Can you reproduce this with another field then the user relationship one? This might be a bug of user relationships.

Please post a full backtrace.

demonrage’s picture

Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new14.28 KB

i'm using (drupal tweaks) for backtrace. this view is a different view that doesn't use (user relationships) by anyway. it uses the (uid) as an arguments and normal core fields like

Node: Type
Node: Title
Node: Has new content
Node: Updated date Updated date
Node: Comment count Replies

here is the backtrace:

warning: Invalid argument supplied for foreach() in /home/pyraef3b/public_html/3alamtaney.com/3alamtaney/includes/form.inc on line 1213.
Backtrace:
form_type_checkboxes_value(array)[form.inc:1020];
._form_builder_handle_input_element(array)[form.inc:889];
..form_builder(array)[form.inc:930];
...form_builder(array)[form.inc:930];
....form_builder(array)[form.inc:930];
.....form_builder(array)[form.inc:930];
......form_builder(array)[form.inc:170];
.......drupal_process_form_new(array)[form.inc:70];
........_drupal_build_form(array)[views.module:1150];
.........drupal_build_form(array)[ajax.inc:128];
..........views_ajax_form_wrapper(array)[admin.inc:1723];
...........views_ui_ajax_form(array)[?:?];
............call_user_func_array(array)[menu.inc:348];
.............menu_execute_active_handler(a:0:{})[index.php:18];
..............index.php
esmerel’s picture

Status: Postponed (maintainer needs more info) » Active
dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Please please please please add arguments to this backtrace.

See #1 #3

dvm(debug_backtrace()) gives you some.

demonrage’s picture

StatusFileSize
new296.58 KB

i think this is what u r looking for. its the full backtrace of the error with arguments. pls check and tell me if something wrong

demonrage’s picture

Status: Postponed (maintainer needs more info) » Active
dawehner’s picture

Yes it is.

As you can see it's impossible to read this.

Better use this comando to get the backtrace:

dvm(debug_backtrace());

You need to install the devel module to be able to do this.

demonrage’s picture

StatusFileSize
new44.17 KB

i have installed devel.
go to devel > other tools > Execute PHP Code,
running this code : dvm(debug_backtrace());

and here is the result

pls correct me if i'm wrong

dawehner’s picture

Well this doesn't really help here :)

You have to to debug_backtrace() from the error.

demonrage’s picture

so can u tell me pls how to do that ??
i'm sorry for buzzing, but the info about devel is so mysterious to a non developer as i'm.

dawehner’s picture

Basically goto includes/form.inc:1213 and try to check the the variable in the foreach.

There you can set a

 if (!is_array($value)) { dvm(debug_backtrace()); }

It's important that $value is different. Read the code for it.

dawehner’s picture

Status: Active » Fixed

Updating to the latest dev fixed the issue.

Status: Fixed » Closed (fixed)

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

kenorb’s picture