Once this CTools issue (#813754: Ability to set variant machine name in Panels UI) is committed, we will have the ability to customize our page manager variant machine names. That's great for creating new variants, but for existing variants some code is needed to allow us to edit them.

Comments

mrjmd’s picture

StatusFileSize
new2.69 KB

Patch.

This may or may not be relevant but I did notice when adding a custom panel variant machine name I see the following error:

Notice: Undefined index: theme in panels_renderer_standard->render_layout() (line 396 of /sites/all/modules/contrib/panels/plugins/display_renderers/panels_renderer_standard.class.php). It looks like there's an existing issue about this error here: #1055766: Undefined index: theme in panels_renderer_standard->render_layout().

michelle’s picture

StatusFileSize
new2.69 KB

I tested this as per the instructions in the CTools issue and it works great! When I applied the patch, it said it was offset by 10 lines so I am uploading a new patch just to fix that. I didn't make any other changes to it so please don't give me the credit for the patch.

Leaving at needs review just to be sure I didn't mess anything up with the new patch.

damienmckenna’s picture

FYI I've committed mrjmd's patch for Panelizer: #2410363: Add ability to edit machine names

mrjmd’s picture

StatusFileSize
new2.69 KB

One more reroll to address the spacing issue Damien caught over in the Panelizer version of this patch. If this goes green I'd say we're RTBC.

damienmckenna’s picture

Status: Needs review » Reviewed & tested by the community

RTBC?

joelpittet’s picture

Yes, RTBC?++

joelpittet’s picture

StatusFileSize
new57.17 KB

Actually curious, if I export the panel to a feature with a machine name change it doesn't try to update the feature, it leaves the old panel with it's old machine name.

Is this something that is expected? Or needs to be addressed here?

mrjmd’s picture

Status: Reviewed & tested by the community » Needs work

There was an issue found with this patch over in the CTools version of it that needs to be fixed. I'll get a patch rolled today.

damienmckenna’s picture

@joelpittet: That's an expected behavior - Panels exports are managed via the machine name, so if you change the machine name it'll show up differently in Features.

@mrjmd: Any update on your patch?

damienmckenna’s picture

The current patch results in the following error when a variant is created:
Notice: Undefined index: theme in panels_renderer_standard->render_layout() (line 396 of plugins/display_renderers/panels_renderer_standard.class.php).

damienmckenna’s picture

What's weird is that if you do dpm($this->plugins); in render_layout(), without the patch you get an array of the layout's configuration, after applying the patch you get a copy of $this->layouts. Further, without the patch $this->display->layout contains the name of the selected layout, with the patch it's an empty string. So, for some reason the layout is not actually being selected correctly.

joelpittet’s picture

This patch is re-surfacing the error from #2416205: Call to undefined function page_manager_handler_check_machine_name() when inside the multistep wizard when going from settings to content in the wizard. I reverted this patch and I could get past that error.

japerry’s picture

Status: Needs work » Closed (outdated)

Drupal 7 is no longer supported, closing.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.