Closed (won't fix)
Project:
Display Suite
Version:
7.x-2.0
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Oct 2012 at 10:14 UTC
Updated:
13 Nov 2014 at 11:42 UTC
Jump to comment: Most recent
Comments
Comment #1
cspitzlayI think this is the same issue that I am facing:
I have two different custom view modes (via ds_extras) on the same page
and only the one from the main page works.
The node whose view is rendered has one configured,
and then there are entities connected via entity_reference
that are supposed to be "rendered as entities" with another custom view mode.
I don't see the rendered referenced entities, whereas if I use a the standard teaser view mode
I can see them.
I think at least part of the problem is the use of a single drupal_static for storing the view mode.
ds_extras_entity_view_alter(&$build, $entity_type) overrides the view mode
using that one single static (drupal_static('ds_extras_view_mode')),
but it would need to use a different one depending on the entity view
being altered at that time, wouldn't it?
Looks like a bug to me, or do I misunderstand the meaning of the view mode setting?
Comment #2
swentel commentedThat code shouldn't interfere normally as that holds the view mode for the main page, not the entity references, but I can recheck.
Could you give me the exact steps to reproduce, that will be easier for me then.
Comment #3
cspitzlay- I used the article content type for the "main" page.
- Each node of that type has a custom view mode created by ds_extras, let's call it viewmode1.
- The article type has a multi-valued entity_reference field that allows you to select entities of a type configured using the entity construction kit, let's call it type2.
- type2 has a custom view mode created by ds_extras, let's call it viewmode2.
- article's viewmode1 is configured to display entities of type2 as "rendered entity" with viewmode2; the field template is set to "Drupal default".
Here are the ds settings:
- Field templates are enabled but set to Drupal default
- Extra fields are disabled
- "View mode per node" is on
- "Page title options" is on
- "Disable Drupal blocks/regions" is off
- "Field permissions" is off
- "Region to block" is on
- "Views displays" is on
- "View mode switcher" is off
- "Hidden region" is off
The block with the rendered entities is configured to appear in "Sidebar second".
Please feel free to contact me if you need additional info.
Comment #4
cspitzlayComment #5
allio_froggio commentedI think I'm experiencing something similar. I have an entity reference field that allows the content editor to add images (the referenced entity) to the list (the node). When I don't use a display suite lay out, I can see all the fields: title, the image, the body, etc. But as soon as I use any of the display suite fields, the title is hidden (even when it's enabled). I also cannot see the "read more" link. With my custom fields, I have no issues displayed them using Display Suite. It just seems to be an issue with the core fields that are exposed when I'm using a Display Suite lay out. Any help would be greatly appreciated! (My apologies if this is a completely separate issue.)
Comment #6
kingfisher64 commentedHaving searched the thread with "1 in ds_extras_entity_view_alter()" this returned, so I hope it's appropriate place to report this.
I'm getting the following message on a profile2 profile page using the latest dev versions of profile2 mod, latest 2.6 of ds & a newish mod https://drupal.org/project/issues/fc. Using drupal 7.23.
If I can provide anymore information that can be of help, please let me know.
Many thanks.
Comment #7
RobKoberg commentedI don't think this is a display suite issue as I am having this problem when I simply define the custom view mode in code, like:
So probably in entityreference somewhere.
Comment #8
aspilicious commentedThis is such a confusing issue...
Anyone still having problems?
If yes, does it belongs to this issue or should it be a new one?
It feels like everyone is just talking past each other.
:)
Comment #9
aspilicious commentedNo response in 4 weeks. I suppose this is not an issue anymore. Reopen if needed.
Comment #10
pere orgaI just wanted to add that to achieve #1, Dynamic View Mode module could be used.
Comment #11
lukusCheck out https://www.drupal.org/project/entity_view_mode.
You can use it to create an entity view mode and associate it with the entity / bundle you're referencing.