I created a CCK that has 3 matrices in it. When I create a node of this type, and fill in
the 3rd matrix only, the view of the page shows the matrix, but not the 1st 2 that are empty. Fine.

If I go in and edit the node, and fill out the second matrix, the view of the page will only show the 2nd matrix, not the 3rd. Not fine.

If I edit again and fill in the 1st matrix, the view page only shows the 2st matrix. Not fine.

What's going on here? Why are the other matrices not showing up???

Comments

therainmakor’s picture

I am having the same problem. Only the last matrix has data that is being saved in it; all data in the other matrices is lost when you submit the page. I'm using Drupal 5.1/MySQL 4.0.23/PHP 4.4.2.

mydllurth’s picture

Title: Can only display 1 matrix?? » All matrix submissions show now (for me)

I was having the same problem. So I looked at the module code.

A single test in matrix.module caught my eye. I'm new at module development, so take my suggestion as a mere observation of what worked. Obviously a deeper issue is involved, but ...

/* Original content
if ($count == 1) return theme('matrix_table_view',$node->$field['field_name'], $field);
*/

/* What works for me */
if ($count) return theme('matrix_table_view',$node->$field['field_name'], $field);

mydllurth’s picture

Title: All matrix submissions show now (for me) » Can only display 1 matrix??

I was having the same problem. So I looked at the module code.

A single test in matrix.module caught my eye. I'm new at module development, so take my suggestion as a mere observation of what worked. Obviously a deeper issue is involved, but ...

/* Original content
if ($count == 1) return theme('matrix_table_view',$node->$field['field_name'], $field);
*/

/* What works for me */
if ($count) return theme('matrix_table_view',$node->$field['field_name'], $field);

Firewolf’s picture

Same problem here. I have 2 matrices and only 1 is displayed.

With the above change ($count), the 2 matrices are shown, but the 2nd is actually shown 3 times. So, still no perfect solution.

Firewolf’s picture

When the ($count) code is used, it seems that the matrix is displayed n times when it contains n rows. That's why I get it 3 times in my previous post.

Firewolf’s picture

OK, just found out that this issue is solved with v1.2.
Installed this version and the problem is solved in my project.

mh86’s picture

Status: Active » Fixed

works fine with newer versions. mark this as fixed

Anonymous’s picture

Status: Fixed » Closed (fixed)

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