I have downloaded and installed the Matrix Module just fine. However I do get an error once I try and add the field to a content type.
After I choose Matrix Field and click save, I am directed to the field settings page, with a pink block error stating:
warning: Invalid argument supplied for foreach() in /my-sites-path/modules/matrix/matrix.module on line 243.
If I proceed, and "ignore" the error, I create content, the error is displayed but the matrix field is also displayed. However after filling out the fields and saving the node, I get the previous error and the following one:
warning: array_unshift() [function.array-unshift]: The first argument should be an array in /my-sites-path/modules/matrix/matrix.module on line 291.
This CCK field is the perfect field for what I am working on, any support would be appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | matrix-372112-fix.patch | 487 bytes | longwave |
| #9 | matrix-372112.patch | 487 bytes | longwave |
Comments
Comment #1
aaron1234nz commentedThere should be a big warning on the module install page saying that the CCK part of fusioncharts is not complete and should not be used (cause it not finished). However, I have done some work on it this last week. I have a couple of things to add and some dependencies to check then I will release a working version of fusioncharts for cck.
Comment #2
aaron1234nz commentedThe latest dev version contains a working version of fusioncharts for cck
Comment #3
aaron1234nz commentedSorry about the previous two posts. Please ignore them. I've been working on the CCK part of one of my other modules (Fusion charts) and I somehow thought this issue was related to that project, no matrix field.
Comment #4
zigma commentedThank you for supporting such a wonderful module.
I am facing similar issues.
Appreciate any input.
In fact i am also facing issue iwth installation, But the installation related issue is not consistent.
Comment #5
Rosamunda commentedsubscribing. This module rocks!
Comment #6
aaron1234nz commentedThanks, turned out to be a simple mistake on my part. Fixed now.
Comment #7
aaron1234nz commentedComment #8
msimanga commentedHi,
I am using ver 6.x-1.3 and still getting the error, I have pasted the error below. This error only seems to happen if you have more than one matrix field in a content type.
Mpume
* warning: array_unshift() [function.array-unshift]: The first argument should be an array in C:\Apps\xampp\htdocs\infossist\sites\default\modules\matrix\matrix.module on line 292.
* warning: Invalid argument supplied for foreach() in C:\Apps\xampp\htdocs\infossist\sites\default\modules\matrix\matrix.module on line 299.
* warning: Invalid argument supplied for foreach() in C:\Apps\xampp\htdocs\infossist\sites\default\modules\matrix\matrix.module on line 314.
* warning: array_unshift() [function.array-unshift]: The first argument should be an array in C:\Apps\xampp\htdocs\infossist\sites\default\modules\matrix\matrix.module on line 292.
* warning: array_unshift() [function.array-unshift]: The first argument should be an array in C:\Apps\xampp\htdocs\infossist\sites\default\modules\matrix\matrix.module on line 292.
Comment #9
longwaveI am running into the same issue as msimanga. I have attached a patch that checks $field_info before using it which suppresses these error messages.
Comment #10
longwaveRerolled the patch as I put brackets in the wrong place last time!
Comment #11
aaron1234nz commentedI've applied your patch and made a few other changes to the display function. Hopefully this issue is fixed now.
Comment #12
jasonqi commentedI might not have the CVS access to do the patch.
I think between line 294 and 295, add
ksort($row);
it will be :
In some case, the sequence of records in table of "node_field_matrix_data" is unexpected.
Not sure if it is needed to add
ksort($field_info['data']);
before line 294
March 16, 2009 UPDATE, I tested it and ksort($field_info['data']); is needed. for sure now
Comment #13
aaron1234nz commentedThanks for spotting this. I had overlooked this possibility! I think your right on the mark!
Comment #14
aaron1234nz commented