I've been duplicating panelizer nodes in 7.x-2.x in a custom action, which seems to duplicate the panelizer content with no problems.
However I'm planning on updating to panelizer-7.x-3.x soon, and was hoping I could get suggestions on how best to duplicate a node that has user customized panelizer content. I looked through the panelizer module and didn't see anything promising that existed already.
The only approach I can currently see is to duplicate the node with a default panelizer['page_manager'] object (basically unset the old panelizer object), and then use the functions/API provided by panels to add the display to the new node (after entity_save). Is this a good route?
Thanks in advance for any help you guys can give...
Comments
Comment #1
kenianbei commentedThis is what I've ended up with, which works, though I'm not sure how efficient it is:
Comment #2
Lowkey commentedI have had the same problem and spent some time looking through the code.
I'm using Drupal 7.14, Node Clone 7.x-1.0-rc1, Panelizer 7.x-3.0-rc1 (and panopoly 7.x-1.0-beta6)
Here's my solution for the moment:
In the file /path/to/drupal/sites/all/modules/panelizer/plugins/entity/PanelizerEntityDefault.class.php find line 907 and change this:
to this:
That should fix the problem.
Comment #3
merlinofchaos commentedOoh. That is definitely a bug report. $clone should have been removed and is clearly a leftover. Excellent catch. Made the change in #2, and committed.
Comment #4.0
(not verified) commentedRemoved code.