Panels re-render content which causes filters to be ran multiple times (patch included)
cangeceiro - October 27, 2009 - 16:07
| Project: | Panels |
| Version: | 6.x-3.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
I believe this is relevent to the TODO on line 283 of panels_node.module but maybe not. The problem arose for myself when using a combination of filters, the way panels renders the content, the node was getting processed twice, thus breaking presentation of the node since certain filters specifically had to be in a certain order. this patch to panels/plugins/content_types/node_context/node_content.inc prevents panels from re-rendering a node if it has already been processed by the panels_node module.
| Attachment | Size |
|---|---|
| node_content_fix_render.patch | 444 bytes |

#1
Is there a better way to see if the node is already prepared? I don't like checking that flag, unless we're pretty sure this is something that is going to be pretty exclusive to Panel nodes. Also, does this break if you view panel node A inside panel node B? I guess that's an unlikely case since you'd be adding that node via context, but there are ways.
#2
To the best of my knowledge I could not find a better way to tell if the node was prepared. Haven't tried in the scenario of adding panel nodes inside of each other. I tested a scenario of adding a panel node inside of another panel, and it does still render the panel contents of the node being included.