Closed (won't fix)
Project:
Matrix field
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 May 2009 at 22:34 UTC
Updated:
3 Sep 2012 at 18:25 UTC
Jump to comment: Most recent file
Comments
Comment #1
aaron1234nz commentedI think it is possible to implement this feature, it will take a fair bit of work to achieve this.
Do you want to simply display a single field from a matix field, or to be able to filter/sort by that field?
Comment #2
scott859 commentedThanks for your reply.
Yes, I would like to be able to filter/sort fields that are in matrix.
Scott
Comment #3
aaron1234nz commentedI've made the first step by allowing you to pick individual cells from a matrix field to display in a view
Comment #4
scott859 commentedGreat, and thank you!
Scott
Comment #5
alexandreracine commentedKeeping track.
Comment #6
ellanylea commentedrelated Views feature requests:
1. Would it be possible to make matrix field a filter so that it can be exposed and users can search for content inside the matrix field.
2. Would it be possible to make one column of the matrix available as a field. For example, the matrix has 3 columns: university, start year, end year. In the Views page, it'd be great to show just the university field (no need to show start and end year in Views, but available on node).
Thanks so much for the extra widgets and everything you've done so far. Much, much appreciated.
Comment #7
rares commentedHi: I needed views on the 6.x-1.4 branch because I had some issues with 2.x.
I used the great code that @aaron1234nz wrote and ported it for 6.x-1.4. You can find the full 6.x-1.4 module attached with views included.
Aside from adding the three views-related files, the only change to the current code is the addition of the views api hook in matrix.module (patch file attached).
There is also a version with comments: just search for "PORT" to see what changes were made.
Comment #8
davej commented@rares: Thanks for the 6.x-1.4 views backport.
I'm having problems using this with relationships in views, though. When I add a Matrix cell as a field in a view, the relationship that I want to use - which is a relationship via CCK Revision Reference from content type A to a revision of content type B - is missing from the Relationships select. However if I select "Do not use a relationship", the view somehow finds a node of the correct content type B and displays the Matrix cells from that - but this appears to be an arbitrary type B node with no obvious relevance to the original type A node: in fact the same type B node is displayed every time.
The SQL query shown in views preview does not include table node_field_matrix_data at all, which puzzles me!
I was hoping to use this on a project that's getting pretty urgent so if you could give any indication of whether this might get fixed in a day, a week or a year, that would help me decide whether to ditch Matrix or hold out. Meanwhile I'll try 6.x-2.x-dev.
Thanks,
Dave J
Comment #9
davej commentedUpdate: I tried upgrading from @rares' 6.x-1.4 views backport to 6.x-2.x-dev and this broke my existing Matrix fields. In node view they now each display 3 times. In Content type -> Manage Fields, they each have phantom additional rows that I can't delete. In Views admin, the relationship mentioned in #8 is still missing. In Views output, the Matrix fields are now all blank. So don't try that. I took a backup. I'll now try deleting the Matrix fields and recreating under 6.x-2.x-dev .
OK, tried that. I found various detritus lying around. Even after deleting all the Matrix fields, clearing the cache, disabling and uninstalling the module, truncating the sessions table and all cache% tables, there are still loads of phantom Matrix fields appearing as choices in Views admin add field. Where is this being stored?
The relationship mentioned in #8 is still missing. In Views output, the Matrix fields are still all blank.
Thanks aaron1234nz and rares for your work on Views integration, not working yet for my case, however.
Dave
Comment #10
davej commentedThis patch adds support for joins to node_reference. It solved my problem with relationships via CCK revisionreference fields. Patch is wrt matrix-6.x-2.x-dev 2009-07-25, following content.views.inc .
Dave
Comment #11
davej commentedI ran into another problem with views in 6.x-2.x-dev: if a matrix field has a cell with options, e.g. a checkbox field, then none of the cells for this field are available as fields in views. I tracked this down to unserialize failing on $field['rows_elements'] when the options field contains line breaks. The attached patch has a fix for this, following the way unserialize is used in matrix.module, together with the fix from #10.
Comment #12
introfini commentedSubscribing
Comment #13
nimi commentedI installed the patch added the handlers.
For some reason Views is displaying the wrong values.
Any idea how to fix this?
Nimi.
Comment #14
harrrrrrr commented@ #7 rares
I installed your 1.4 version with views support. It doesn't show any value's when i use the matrix fields in a view..
Comment #15
drupov commentedsubscribe
Comment #16
Wild Boar commentedI'm still missing something here. I applied the patches, created 3 nodes with a node type that includes the matrix field, went to create a view but all I see is the matrix field value for one row. Is this just not usable with views yet? This will be a great module when it has full views integration. Looking forward to it.
Comment #17
mehtatejas commentedAny updates?
Even I would also like to use this module in views
Comment #18
intrafusionMarking as Closed (won't fix) as the new co-maintainer will be focusing on D7