I have a view that pulls multiple node types with the same panelized view mode. It has been erratic in sometimes it works as expected, each row is pulling that node type's view mode correctly. More often however after saving a panelizer display all of the rows become normalized to use just 1 of the node type's panelizer settings which doesn't make sense to me.
http://cl.ly/image/0S3P2K0y1n39 <- each row should be different, some have images others have icons. This has worked /sometimes/.
I have yet to pick up a particular pattern. I have tried rendering the entity in a number of ways. These are referenced via entity reference so I have tried a) using the entity reference relationship b) not using the relationship and customizing the field to display the rendered entity and c) using the reference field to spit out an nid and manually calling render(node_view(node_load())) on it just to debug. All the results are the same. I don't think I have run into this issue in views before. I can't put my finger on whether this is some sort of views bug or panelizer bug. It does seem like panelizer saves trigger the problem though.
Comments
Comment #1
drupalninja99 CreditAttribution: drupalninja99 commentedComment #2
drupalninja99 CreditAttribution: drupalninja99 commentedI realized that I didn't need a view to render the entity referenced items. I just added the field to the main panelizer display to skip the view altogether. I am seeing the same results, so this is not views related.
Comment #3
DamienMcKennaHave you checked the database to ensure the correct default is selected for the desired view mode?
Comment #4
DamienMcKennaIs there any preprocessing being done on the output?
Comment #5
drupalninja99 CreditAttribution: drupalninja99 commentedHere is a good example of what happens, before and after:
Output is mostly correct: http://cl.ly/image/3H0S2b3b2Z3A
I noticed that I hadn't configured a video thumb correctly so I updated that panelizer config. Now my video thumbs are showing up and all my icons disappear on my other node types: http://cl.ly/image/322X3p2c1K0O
The panelizer save triggered some kind of issue that affected the other node types.
Comment #6
drupalninja99 CreditAttribution: drupalninja99 commentedAll of my node types have the 'search result' view mode enabled with panelizer turned on. It's just weird that saving 1 panelizer setting messes up the others.
Comment #7
drupalninja99 CreditAttribution: drupalninja99 commentedI don't think any preprocessing is being done on the output.
Comment #8
drupalninja99 CreditAttribution: drupalninja99 commentedI had some old preprocess hooks that I wasn't using so I disabled them all to make sure nothing funky was going on. The problem still occurs.
Comment #9
drupalninja99 CreditAttribution: drupalninja99 commentedOK I can confirm that it's thinking all node types are using the video panelizer setting.
If I hover over document and click 'panelizer' from the context links and then click content I see the video panelizer setting which is obviously incorrect. If I go to the document's panelizer settings for that view mode they are different than video.
I don't know what's causing panelizer to attempt to apply the video panelizer setting to all node types.
Comment #10
drupalninja99 CreditAttribution: drupalninja99 commentedAnother test, I tried just adding a document to another page. I wanted to see if it renders correctly when it's isolated in a list. I can confirm that the same problem occurred. No matter where I add resource view mode 'search result', it's getting tied to the video panelizer settings for 'search result'. It's been bouncing back and forth all day where one content type's panelizer settings get applied to other content types with that same view mode.
Comment #11
drupalninja99 CreditAttribution: drupalninja99 commentedMore testing, it looks like the panelizer page it's on is causing the problem. I created a test view that just pulled all resource content of the panelized 'search result' view mode and they pulled correctly.
Comment #12
drupalninja99 CreditAttribution: drupalninja99 commentedPlaying with it in a test view, everything looks great until I add the entity reference relationship. That busts the view modes. So entity reference related?
Comment #13
drupalninja99 CreditAttribution: drupalninja99 commentedGoing to test the node reference module (which I still have enable for legacy content).
Comment #14
drupalninja99 CreditAttribution: drupalninja99 commentedSo after debugging an issue with a field on the document content type, I saved it and now everything looks like a document:
http://cl.ly/image/2U0F0i0n0236
Comment #15
DamienMcKennaUnfortunately the images you uploaded to cloud.ly are gone. Could you please recreate the scenario and upload the images to d.o? Thanks.