Closed (fixed)
Project:
Fieldable Panels Panes (FPP)
Version:
7.x-1.x-dev
Component:
Panels integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Apr 2018 at 15:11 UTC
Updated:
9 Feb 2019 at 02:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
damienmckennaThis is based upon the code in #2070891-32: Support core Content Translation by cloning the Panelizer display for the new entity.
Comment #3
damienmckennaThis needs extra work to handle reusable FPPs, which shouldn't be cloned.
Comment #4
damienmckennaDon't clone reusable FPPs.
Comment #5
dsnopekThis line should be removed: the code doesn't use $type or $id from here, it does this again later on right before it's used...
... right here!
Do we also need to reset 'timestamp' and 'created'? I'll do some testing later
Comment #6
dsnopekOh, and this will fail badly for the 'current:' prefix since there is no 'current' key - that uses the fpid. So, this needs a little extra logic for that.
Comment #7
dsnopekHere's a new patch that addresses my review above, and also renames same variables for clarity. The patch was previously using
$contentfor the original FPP entity, and$new_panefor the cloned FPP entity, which was confusing because there was also$panewhich was the Panels pane (so there was an asymmetry between$paneand$new_pane).So, I changed:
$contentto$fpp$new_paneto$new_fppThis shows the relationship between the original and new FPP entity, and removes any confusion with the pane.
Still untested - sorry :-)
Comment #8
dsnopekOk, finally got around to testing this in conjunction with the latest patch on #2070891-44: Support core Content Translation by cloning the Panelizer display for the new entity and it worked great!
I dug into the database, same as I did on #2975438-2: Clone FPP entities when cloning a Panelized node via 'node_clone', to confirm that everything looked as it should and it did :-)
Comment #9
cboyden commentedWe've been using this patch, in conjunction with the one in #2070891: Support core Content Translation by cloning the Panelizer display for the new entity, and it's working. Cloning a panelized entity creates cloned FPPs appropriately, and handles reusable FPPs correctly.
Comment #10
damienmckennaThat's fantastic, thanks for the update cboyden!
Comment #12
damienmckennaCommitted. Thanks!