Posted by szantog on November 16, 2012 at 7:48am
5 followers
| Project: | Panopoly |
| Version: | 7.x-1.x-dev |
| Component: | Admin |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
The admin/panopoly/libraries/pages Overridden Page Templates contains all of the panelized contents, not only the overridden. We have default panes set up on content types, so creating new entity always generates new record in panelizer_entity table.
As I figured, the difference between the overridden and default the did value on panelizer_entity table:

If I am right, we need a ->condition('pe.did', 0, '>') in panopoly_admin_overridden_page_templates_content_type_render()
<?php
function panopoly_admin_overridden_page_templates_content_type_render($subtype, $conf, $panel_args, $context) {
// --- some stuff ----
$pages = $query
->fields('pe', array('entity_type', 'view_mode', 'entity_id'))
->orderBy('pe.entity_id', 'DESC')
->condition('pe.entity_type', $entity_types)
->condition('pe.view_mode', 'page_manager')
->condition('pe.did', 0, '>') // <--this
->execute()
->fetchAllAssoc('entity_id');
foreach($pages as $overridden_page) {
?>| Attachment | Size |
|---|---|
| Selection_052.jpeg | 83.11 KB |
Comments
#1
I can confirm this is the case. If you have multiple allowed default panel layouts the node will show as overridden regardless of the actual state. The did check does look to fix it.
Here's the patch.
#2
Awesome
#3
It seems, a ->distinct() is also missing,
I get this list: http://www.diigo.com/item/image/2peqe/367s?size=o
Sorry, if I don't file patch, the environment, within I'm working, it is hard to make patches.
#4
Makes sense. Added it up!
#5
Automatically closed -- issue fixed for 2 weeks with no activity.