Closed (fixed)
Project:
Matrix field
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 May 2007 at 09:19 UTC
Updated:
26 Nov 2007 at 10:01 UTC
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
Comment #1
therainmakor commentedI 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.
Comment #2
mydllurth commentedI 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);
Comment #3
mydllurth commentedI 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);
Comment #4
Firewolf commentedSame 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.
Comment #5
Firewolf commentedWhen 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.
Comment #6
Firewolf commentedOK, just found out that this issue is solved with v1.2.
Installed this version and the problem is solved in my project.
Comment #7
mh86 commentedworks fine with newer versions. mark this as fixed
Comment #8
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.