While working on #2222727: Add support for Fieldable Panels Panes we began to notice that Fieldable Panels Panes on page manager and mini panel export did not specify a UUID subtype. A new UUID for the pane would be created, but it would not reference a featurized fieldable panels pane.

Upon inspection of fieldable_panels_panes_fieldable_panels_pane_content_type_edit_form_submit() the entity called from the form state always passed FALSE for the is_new property. Since the function checked is $entity->is_new was empty, the subtype was never properly set.

This patch removes the conditional is_new check to allow the form state's pane to have its subtype properly set, so when a page or mini panel is exported the UUID is intact.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mglaman’s picture

Title: Does not proper set pane subtype on content edit form submit. » Does not properly set pane subtype on content edit form submit.

Fix title typo.

cosmicdreams’s picture

Status: Needs review » Reviewed & tested by the community

Tried this patch on today and it saved me from my troubles in getting the fieldable panel panes properly featurized. I don't really know why NOT checkout for is_new solves this issue and probably speaks to a larger issue. But I'd rather have this in the stable release so I don't have to patch it anymore.

scottalan’s picture

Stepped through the patch and only thing that would be better would be an update hook that updates all the existing subtypes. This patch is great but only works if you go back through each fieldable_panel_pane and re-save them. It also doesn't work if the fieldable_panel_pane is edited outside of the pane (which you mention in the comments) such as fieldable_panels_panes_entity_edit_form_submit(). I'll see if I can come up with an update hook that will work.

bwood’s picture

I applied this patch and it worked as advertised.

I had two FPP entities which provided content for two panels panes. I had used hook_default_page_manager_pages to pull the page containing the panes (it references their UUIDs) into my feature. Using the dev version of uuid_features and this patch I was able to add the needed entities.

Helrunar’s picture

Patch works fine for me

scottalan’s picture

So has this actually been committed to FPP 1.5 or dev? I've searched the logs and can't seem to find a reference to this node or anything from this: https://www.drupal.org/node/2222727#comment-8925045

DamienMcKenna’s picture

@scottalan: The issue is still at "RTBC" stage, so it hasn't been committed yet. Also, there's a really cool thing in the repositories which causes all tickets to have a note added any time a change is committed that references an issue number, so you can (fairly) quickly see if something was committed

Hopefully this week.

DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

  • DamienMcKenna committed 629449f on 7.x-1.x authored by mglaman
    Issue #2246893 by mglaman: Does not properly set pane subtype on content...

Status: Fixed » Closed (fixed)

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