Hello,

Thanks for the great module.

I have downloaded the alpha version of 2.x because I need the ability to use select list in my table. My application is basically a survey where I have created about 10 columns with 7 rows with a drop down select list of 1-3 to allow the user to rate their preferences based on the question.

I am able to create the matrix field no problem.

When the user attempts to view the node, the following errors/warnings are displayed.

I have tried deleting the field and creating a new matrix field with the same name and the same behavior occurs.

Any suggestions?

Thanks again..
G

warning: Invalid argument supplied for foreach() in /drupal/modules/matrix/matrix.module on line 565.
warning: ksort() expects parameter 1 to be array, null given in /modules/matrix/matrix.module on line 573.
warning: Invalid argument supplied for foreach() in drupal/modules/matrix/matrix.module on line 574.
warning: Invalid argument supplied for foreach() in modules/matrix/matrix.module on line 608.
warning: Invalid argument supplied for foreach() in modules/matrix/matrix.module on line 565.
warning: ksort() expects parameter 1 to be array, null given in modules/matrix/matrix.module on line 573.
warning: Invalid argument supplied for foreach() in /modules/matrix/matrix.module on line 574.
warning: Invalid argument supplied for foreach() in matrix/matrix.module on line 608.
warning: Invalid argument supplied for foreach() in /modules/matrix/matrix.module on line 565.
warning: ksort() expects parameter 1 to be array, null given in modules/matrix/matrix.module on line 573.
warning: Invalid argument supplied for foreach() in /matrix/matrix.module on line 574.
warning: Invalid argument supplied for foreach() in /matrix/matrix.module on line 608.

CommentFileSizeAuthor
#3 matrix-498802-3.patch1.08 KBduellj

Comments

gsvitak’s picture

Hi

I debugged the code and appears we need to check to see if the field_info needs to check to see if the data index is available.

Add the following link to 565

if (isset($field_info['data'])) {

Add the following link to 577

if (isset($field_info['data'])) {

and add the following to 614

if (isset($data)) {

will add patch later

aaron1234nz’s picture

Please try the -dev version. There are large number of bug fixes in there.

duellj’s picture

Version: 6.x-2.0-alpha1 » 6.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new1.08 KB

This is still a problem with the latest -dev version. It's a pretty simple fix, you just need predefine a couple variables that don't necessarily get set later on. I've attached a simple patch that fixes the warnings.

aaron1234nz’s picture

Status: Needs review » Fixed

Thanks

committed

Status: Fixed » Closed (fixed)

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