Hi Tim,

Great module, really useful. I noticed that when I set up a new view mode for a field collection and render it through this module the table still shows all the cells (only the order is different). This is because the view mode is not properly recognised in the function which renders the output. Patch to follow shortly.

Comments

tanc’s picture

Status: Active » Needs review
StatusFileSize
new1.04 KB

Here's the patch :-)

tanc’s picture

StatusFileSize
new1.34 KB

Updated patch to sort the weights properly per view mode.

tanc’s picture

Still an issue in latest dev. Any chance of this getting looked at/committed?

wla_g’s picture

I take it even further: When I put an additional field into a view mode of the field collection via display suite, this field isn't shown in the table, but the "normal" view mode formatter of field collection recognizes this field and shows it.

OnkelTem’s picture

Priority: Normal » Minor
kevinquillen’s picture

Priority: Minor » Normal

This patch worked for me.

Also, since some people may use multiple view modes per collection (per device) like me, this should probably get in the sooner the better. It's not immediately clear from the UI that this isn't working.

WorldFallz’s picture

StatusFileSize
new1.77 KB

updatated patch that also fixes the column headers printing even when set to hidden.

WorldFallz’s picture

Title: Not using view modes correctly » Not using view modes correctly (& header showing when set to hidden)

just making this patch easier to find

josebc’s picture

patch is causing php warnings and only the last field is appearing
Notice: Undefined index: full in field_collection_table_field_formatter_view() (line 41 of /var/www/htdocs/sites/all/modules/field_collection_table/field_collection_table.module).

attisan’s picture

I refined this patch to correctly work - #2004742: view mode & hidden label support

imclean’s picture

attisan’s picture

thanks - though my patch isn't really a duplicate of either issues - I'll post it here anyway.

greets,

attisan

imclean’s picture

@attisan, there wasn't enough information in your issue to determine what your patch was supposed to do. Were you referring to a different "view mode & hidden label support" problem? What does the patch in #12 do?

attisan’s picture

@imclean

sorry if I've not been clear about that! the patch in #12 is the same as in #2004742: view mode & hidden label support.

what this patch does:

  • visibility and order of each display / view mode will be respected -> no matter if you use core view mode, entity_view_mode or ds. (though ds should work, I haven't checked that).
  • if a header is set to hidden (in the display / view mode) - the according <th> will be blank
  • if all headers in the selected display / view mode are hidden, <thead> will be empty and thus hidden

attisan

old_toby’s picture

StatusFileSize
new2.55 KB

thanks to attisan for the good work. I cleaned up some stuff, though.

  • changed the check for the field collection item's view mode - I got an error before because it was 'default' while the field collection's view mode was 'full'
  • moved down the snippet to remove all headers because the operations column was inserted afterwards

Everything should work now.

Exploratus’s picture

Issue https://drupal.org/node/1401492 references this issue.

Basically I have a field collection table in views and it displays as a sticky header. I want just a regular header, not a sticky header, but I see no where I can set this.

Is this issue related to https://drupal.org/node/1401492? I dont see any mention of sticky headers anywhere.

Cheers.

RossP-1’s picture

The patch from #15 above worked great on Drupal 7.21 and Field Collection Table 7.x-1.0-beta1. Thank you attisan and old_toby!

anybody’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Patch #15 works great agains the latest .dev and I think it's time to get this into the latest .dev version.

kristofferwiklund’s picture

Status: Reviewed & tested by the community » Fixed

Fixed

Status: Fixed » Closed (fixed)

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