Hi, I am using latest VIEWS, PANELS, DS and CTOOLS. First I want to say that I love Display Suite, thanks for building it!
Now my usecase:
I have added a custom DS view mode: apartments. I try to get to this DS view mode from a specific node, and when I click on manage display, it leads me to the right custom view mode. But when I look at the fields shown, it shows the full content view mode.
So for this node particular build apartments view mode is somehow overriden by the default full content view mode.
Setting the view mode in the node-edit form is not bringing me there..
Thanks a lot in advance for going into this!
Greetings, Martijn
Comments
Comment #1
swentel CreditAttribution: swentel commentedDo you mean setting a node view mode per node on the node form alter ? I'm not exactly following what you're trying to achieve here.
Comment #2
swentel CreditAttribution: swentel commentedCleanup up the queue
Comment #3
Summit CreditAttribution: Summit commentedHi,
Sorry for long time not responding, I was on long travel.
I am trying to achieve that one specific node shows the fields of one specific viewmode.
Right now when I choose a specific view mode (apartments) on a specific node, it is not shown.
The node shows the view mode which is chosen for all nodes for this nodetype.
Greetings, Martijn
Comment #4
swentel CreditAttribution: swentel commentedAlright I'll have a look at this and try to fix it for the upcoming release - If I can reproduce since I've not been able to right now, but I'll try again :)
Comment #5
swentel CreditAttribution: swentel commentedWe've been trying to reproduce this with 3 people at the sprint and this works fine, so absolutely not sure what's going on.
Comment #6
Summit CreditAttribution: Summit commentedok, will check it out with the newest dev's of all modules. When I do not respond everything is fine, otherwise I will respond here with usecase and settings, ok?
thanks for the effort! Greetings, Martijn
Comment #7
RowboTony CreditAttribution: RowboTony commentedI encountered this issue today. I don't know why it is occurring, but I do know how and under what conditions. I am using DS with the latest NodeStream 7.x-2.0-rc4 distribution. And, for whatever reason, when the Panels node template
/node/%node
is enabled - my DS view mode per node settings don't work, as soon as I disabled the panels Node template the DS template works... I've fiddled around with context rules, and even disabled the "Page" variant of the Node template (as this particular use case is for a Page), but even when that is disabled, and the Node panelizer settings are excluding the node path specifically - the DS view mode does not work. Only when the entire/node/%node
Node template is disabled will my custom DS view mode work. Hope that helps anyone else who may encounter this issue.Comment #8
mrP CreditAttribution: mrP commentedSame issue as #7
Comment #9
Diane Bryan CreditAttribution: Diane Bryan commentedIf the maintainers want to see a site where this problem is happening, let me know. I'm developing on Pantheon, and the live version of the site just developed the "you are getting the full-content view mode now" bug, while (so far) the test version of the site is nearly properly displaying the view mode assigned to each node.
It's under very active development, so get back to me soon.
d
Comment #10
fhelms CreditAttribution: fhelms commentedi can confirm #7
once the /node/%node panel page is enabled -
the custom view mode assigned on an individual node will be overwritten with the full-view mode.
Comment #11
kopeboy CreditAttribution: kopeboy commentedI can confirm #7 and I have a similar issue as well:
when Node add/edit form is enabled in Panels and DS layout is used in the edit form (Manage fields) of the content type, the fields placed in the "Hidden" region won't be hidden but visible.
In the panel I included the default Node add/edit form, I mean all of it, not choosing the single fields.
EDIT: the DS layout won't apply at all. Panels is building the base form. Even if I apply the DS 2 columns layout in Manage Fields, the default layout will apply.
Is this possible to make DS form work within Panels when using the "Node general form" as the pane?
Comment #12
rcodina CreditAttribution: rcodina commentedI can also confirm #7 If I disable Node template override made by panels the feature gets restored.
Comment #13
rcodina CreditAttribution: rcodina commentedA workaraound I'm using is just this module: https://www.drupal.org/project/contextual_view_modes
Comment #14
nimbfire CreditAttribution: nimbfire commentedI am facing the same issue. Digging via backtrace I've found:
The normal invocation of a node via panels is, the one that works as desired:
20: mymodule_node_view() (Array, 2 elements)
19: call_user_func_array() (Array, 1 element)
18: module_invoke_all() (Array, 2 elements)
17: node_build_content() (Array, 2 elements)
16: node_view() (Array, 2 elements)
15: ctools_node_content_type_render() (Array, 2 elements)
14: ctools_content_render() (Array, 2 elements)
13: panels_renderer_standard->render_pane_content() (Array, 2 elements)
12: panels_renderer_standard->render_pane() (Array, 2 elements)
11: panels_renderer_standard->render_panes() (Array, 2 elements)
10: panels_renderer_standard->render_layout() (Array, 2 elements)
9: panels_renderer_standard->render() (Array, 2 elements)
8: panels_display->render() (Array, 2 elements)
7: panels_render_display() (Array, 2 elements)
6: panels_panel_context_render() (Array, 2 elements)
5: ctools_context_handler_render_handler() (Array, 2 elements)
4: ctools_context_handler_render() (Array, 2 elements)
3: page_manager_page_execute() (Array, 2 elements)
2: call_user_func_array() (Array, 1 element)
1: menu_execute_active_handler() (Array, 2 elements)
0: main() (Array, 2 elements)
And a invocation of a panel of node/%, that is forcing 'full' as view mode :
11: mymodule_node_view() (Array, 2 elements)
10: call_user_func_array() (Array, 1 element)
9: module_invoke_all() (Array, 2 elements)
8: node_build_content() (Array, 2 elements)
7: node_view() (Array, 2 elements)
6: node_view_multiple() (Array, 2 elements)
5: node_show() (Array, 2 elements)
4: node_page_view() (Array, 2 elements)
3: page_manager_node_view_page() (Array, 2 elements)
2: call_user_func_array() (Array, 1 element)
1: menu_execute_active_handler() (Array, 2 elements)
0: main() (Array, 2 elements)
I want to point that the function node_show() is, aparently, forcing 'full' for view mode for all nodes.
Comment #15
nimbfire CreditAttribution: nimbfire commentedI discovered that you can view the correctly formatted node using the Add content -> Entity -> Rendered Node. =)
Comment #16
aleksijohansson CreditAttribution: aleksijohansson commentedI +1 this problem, but it is mentioned in the View mode per node settings "If you install the Page manager module and override the node view, Page manager will win.". Would be really good to find a solution this though.
Comment #17
haunted CreditAttribution: haunted commentedI confirm #7, and #15 doesn't work for me.
Comment #18
droddis CreditAttribution: droddis commentedHas anyone had any luck with this? I'm seeing the same issue but I don't have page Manager installed. I have seen strange behavior between DS and Panels before though and I'm wondering if that could be part of it. Unfortunately I'm not doing very well at troubleshooting the issue.
Comment #19
balapalanisamy CreditAttribution: balapalanisamy as a volunteer and commentedI have temporarily fixed this in Page Manager module with a small patch. Not sure this is the correct way as this is only specific for DS view modes with node view.
There is an issue already in ctools for page manager overrides https://www.drupal.org/node/2422123.
It seems the DS module is not using the hook "page_manager_override" for applying the DS view modes. So the other patch is not working. I have not checked this very well. Needs to be verified.
Comment #20
icampanaHi! I was going crazy with the same issue on a site that uses page_manager and DS as well, didn't wanted to patch the module to avoid future issues so with answer from #19 and what I found on the Ctools page manager code I was able to create a hook on my custom module that allowed me to have both, Page Manager (with panels) still working and DS Custom View Mode still rendering as usual.
Should allow both modules to live together and be good neighbors