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:

Selection_052.jpeg

If I am right, we need a ->condition('pe.did', 0, '>') in panopoly_admin_overridden_page_templates_content_type_render()

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) {
CommentFileSizeAuthor
#1 1842374-only-overrides.patch615 bytesbeeradb
Selection_052.jpeg83.11 KBszantog

Comments

beeradb’s picture

Status: Active » Needs review
StatusFileSize
new615 bytes

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.

populist’s picture

Status: Needs review » Fixed

Awesome

szantog’s picture

Status: Fixed » Needs work

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.

populist’s picture

Status: Needs work » Fixed

Makes sense. Added it up!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

typo