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.
| Comment | File | Size | Author |
|---|---|---|---|
| properly-set-pane-subtype-on-edit-form-submit-0.patch | 1.38 KB | mglaman |
Comments
Comment #1
mglamanFix title typo.
Comment #2
cosmicdreams commentedTried 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.
Comment #3
scottalan commentedStepped 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.Comment #4
bwood commentedI 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.
Comment #5
Helrunar commentedPatch works fine for me
Comment #6
scottalan commentedSo 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
Comment #7
damienmckenna@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.
Comment #8
damienmckennaCommitted.