We need a migration path from Panelizer to Layout Builder. Here's an issue where we can work on it.

Comments

phenaproxima created an issue. See original summary.

phenaproxima’s picture

StatusFileSize
new31.24 KB

Here's a sketchy first stab at migrating the Panelizer layouts stored in config only (entity view displays), done at the layout sprint this week at Acquia. There is some test coverage, but it needs to be greatly expanded. Just posting it here so I don't accidentally blow it away on my localhost.

phenaproxima’s picture

StatusFileSize
new32.67 KB
new5.64 KB

Expanded the test coverage to assert that the migrated layout section actually looks the way we expect it to.

phenaproxima’s picture

Migrated the entity_field block IDs to field_block.

I had to work around a limitation in core Migrate, which may be fixable over in #2684689: SubProcess process plugin doesn't support passing context values from source plugin.

damienmckenna’s picture

I think this could be added to a 8.x-5.x branch.

damienmckenna’s picture

Version: 8.x-4.x-dev » 8.x-5.x-dev
aolsen356’s picture

Is anybody aware of a another place I can find documentation on upgrading from panelizer to layout builder?

damienmckenna’s picture

@aolsen356: There isn't anything else right now, unless you want to get into working on the upgrade code itself.

darrell_ulm’s picture

Adding a quick note to see if there have been any updates to this on upgrading from panelizer to layout builder?

Did any hear anything at Drupalcon 2019?

phenaproxima’s picture

I've opened a sandbox project to work on this: https://www.drupal.org/sandbox/phenaproxima/3065457

aaronmchale’s picture

@phenaproxima I love the play on words there with the sandbox project name "PaneLBizer"

phenaproxima’s picture

Thank you, Panelizer maintainers, for granting me commit access. I promise to use this power for good.

My plan is to leave every branch but 8.x-5.x alone. I won't commit any bugfixes or features to 5.x unless they directly affect the migration path to Layout Builder.

I envision the 5.x branch as being, effectively, the "end of the line" for Panelizer. My inclination is for the 8.x-5.x branch to ensure that pre-existing Panelizer layouts continue to work, but to remove the ability to add new layouts, edit existing ones, or enable Panelizer for entity view displays that don't already have it. Instead, panelized view modes will simply present a nice button: "Convert to Layout Builder".

So basically, moving to the 8.x-5.x version of Panelizer would "freeze" your layouts until you migrate them each to Layout Builder. Thoughts?

phenaproxima’s picture

Component: Other module integration » Layout Builder migration
phenaproxima’s picture

Title: Migration path to Layout Builder » [META] Migration path to Layout Builder

This should be a meta-issue.

phenaproxima’s picture

Why is this issue its own parent? :)

sylus’s picture

I had a few questions about this upgrade path as have been trying out the latest dev release of panelizer and the automatic migrate to layout builder process.

a) The new layouts do get created but for components like page_title_block moved to the new layout config the following gets used:

          62dd7b94-9f49-4b61-ad40-f65d365a7f46:
            uuid: 62dd7b94-9f49-4b61-ad40-f65d365a7f46
            region: top_right
            configuration:
              id: page_title_block
              label: 'Page title'
              label_display: visible
              context_mapping: {  }
            additional: {  }
            weight: -1

You will end up getting a missing entity when trying to go to the layout library section and clicking on the template. This is because context_mapping is empty and I also think the block name has changed to.

b) When going on a specific piece of content and hitting the layout tab I also get a missing entity unless for some reason I purge content from key_value_expire. (Not sure about this one)

c) Aside from the above which can be manually fixed the larger problem is for the configuration that is house per piece of content itself and not a default template. Basically layouts that are stored in field_panelizer. For us we have hundreds of this pages so manual fixing is probably not feasible. Is this upgrade path going to be something that is supported?

Here is a P.R. I am working on to update our Distro with changes if helps: https://github.com/drupalwxt/wxt/pull/172/files

phenaproxima’s picture

This is because context_mapping is empty and I also think the block name has changed to.

Static contexts are a tricky part of this which I have to address separately, I think.

When going on a specific piece of content and hitting the layout tab I also get a missing entity unless for some reason I purge content from key_value_expire.

O_o Steps to reproduce might be very helpful here...

Is this upgrade path going to be something that is supported?

Yes. That's next on the list.

sylus’s picture

Hey just wanted to say really appreciate the work on this as everything is working great.

Am def really curious how going to solve static contexts and excited to see how is done.

Thx again for all your help

sylus’s picture

Hi I was just curious if there has been any progress on static contexts? I wish I could help with this but not sure where to start it.

I think it is the last blocker preventing us from fully working with new v4.0.0+ of Lightning from a fresh install perspective.

Any information would be helpful and again super appreciate you taking this on :D

zseguin’s picture

Hello, I'm also running into this issue and curious about the update path for static contexts?

josephdpurcell’s picture

I see some EXCELLENT work done here to migrate into Layout Builder -- to talk about this being generic I've created https://www.drupal.org/project/panelizer/issues/3087208.

phenaproxima’s picture

I'm finally ready to tackle this. Opened an issue to address static contexts: #3091783: Support migrating static contexts

damienmckenna’s picture

clayfreeman’s picture

The referenced issue will be a blocker for stable 5.x release.

chrisgross’s picture

Does anyone know what the current status of this is? I've been trying to find a working migration path from a D7 distro using Panelizer to D9 w/Layout Builder, but have been thus far unsuccessful. Is this being abandoned or is here a functional patch out there that at least get me part of the way there?

candelas’s picture

@chrisgross have you find the way? I am trying that too.