We are trying to upgrade our sites from 7.x-2.0 to 7.x-3.1 and every time we try, all the nodes that are panelized with custom layouts revert to displaying as default, thus a large number of pages no longer display all their content...

This happens whether you check before OR after running update.php, and whether or not you actually shut off Panelizer during the process. If you revert the codebase to 2.0, the correct displays return.

I have done some poking and the entity id's revision ID's and DID info all appears correct in the database. BUT if you look at the devel tab on the node, you can clearly see that it loaded the DID of the default display for some reason. The only error message I've seen that might be related has to do with passing something empty to IPE, but disabling IPE or changing the pipeline doesn't seem to do anything.

To me it looks like it is failing to load the revision info somewhere, but I was able to confirm that when the page build called the enitity_load method of PanelizerEntityDefault.class all the revision AND the display (DID etc) info was correct.

FYI, we do have some panopoly features/modules installed on our sites, but have been slowly divorcing them from our build because they cause a lot of frustrating non-standard behaviors.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

erykmynn’s picture

Title: Custom displays display as Default after upgrading from 2.0 to 3.1 » Custom displays Default out after upgrading from 2.0 to 3.1
DamienMcKenna’s picture

I really want to have this working for the next stable release.

erykmynn’s picture

This happened because an earlier developer "Upgraded" panelizer from an unlisted 3.x version to the current 2.x.

That means that the new field existed, but was null for all items created in that time.

Manual DB change was able to fix it.

DamienMcKenna’s picture

Category: Bug report » Support request

What did you change in the database to make it work? And are you saying that someone first downgraded from v3.x to 2.x, so that when you then upgraded again to 3.x it wasn't working correctly?

PeterStub’s picture

I can confirm that after an upgrade from 2->3 - exported through features - none of our defaults were available. I can see them in my list of features - and they need to be reverted - but I cant. The checkbox is there and it says Reverted - but its not.

Just tried a clean installation with version 2. Created some defaults with different layout/content. Did a feature export. Then installed a new site with version 3. Added my feature and enabled it. Nothing - empty dropdown when creating new article. Disabled feature and then a default showed up.

Is there anything I can try/do?

Tks

DamienMcKenna’s picture

Version: 7.x-3.1 » 7.x-3.x-dev
Category: Support request » Bug report
DamienMcKenna’s picture

FTR Panelizer 7.x-2.0 included panelizer_update_7103, so the first update when updating to Panelizer 7.x-3.x is 7104.

DamienMcKenna’s picture

So, step 1:

For Panelizer 7.x-2.0 the config variable was structured like this:

panelizer_defaults_node_article:
  status: 1
  default: 1
  choice: 1

On 7.x-3.x it looks like this:

panelizer_defaults_node_article:
  status: 1
  help: ''
  'view modes':
    page_manager:
      status: 1
      substitute: ''
      default: 1
      choice: 1
    default:
      status: 0
      substitute: 0
      default: 0
      choice: 0
    teaser:
      status: 0
      substitute: 0
      default: 0
      choice: 0
DamienMcKenna’s picture

Status: Active » Needs review
FileSize
1.82 KB

This should convert the variables.

DamienMcKenna’s picture

I compared the data structures of the tables, they seemed to be ok after the update, the main difference was the configuration.

azinck’s picture

I can't actually reproduce the initial problem. I'm testing an update from 2.x to 3.x *without* the patch in this issue.

I'm not completely clear on what the problem is from the description. I suspect it's one of the following 2 things:

  1. You have multiple available panelizer configs set up for a content type and are using the "allow panel choice" option to let users choose between them. If a node has a non-default choice selected then you're saying updating to 3.x from 2.x causes it to revert to the default choice.
  2. You have a single default Panelizer config for your content type(s) but that's been overridden on some specific nodes and the layout, content, and context settings have been customized. You're saying updating to 3.x lost those customizations.

Is it one of those 2? I'm in situation #2 but I don't see any problem going from 2.x to 3.x. Nothing was lost, as far as I can tell. For all the nodes I've checked, nodes that had overridden Panelizer config prior to the update continue to be correctly overridden. Again, I'm testing this without the patch in this issue.

That said: I do have several other 2.x > 3.x patches in place so I'll dig a little deeper to see if one of those is fixing the problem.

azinck’s picture

So I've tested this again without my additional upgrade patch in place and still couldn't reproduce the original pre-patch problem.

DamienMcKenna’s picture

A minor tweak, only include the settings we want.

  • DamienMcKenna committed ca01f0c on 7.x-3.x
    Issue #2124517 by DamienMcKenna: Update the entity configuration...
DamienMcKenna’s picture

Title: Custom displays Default out after upgrading from 2.0 to 3.1 » Custom displays Default out after upgrading from 2.x to 3.x
Status: Needs review » Fixed
Related issues: +#2787147: Plan for Panelizer 7.x-3.5 release

I've committed the patch from #13, which resolves the original issue. If there are further problems with this please open up other issues and we'll work through them one at a time.

Status: Fixed » Closed (fixed)

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