Closed (fixed)
Project:
Panelizer (obsolete)
Version:
7.x-3.x-dev
Component:
IPE integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Feb 2014 at 15:22 UTC
Updated:
9 Feb 2019 at 04:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fullerja commentedComment #2
fullerja commentedComment #3
damienmckennaComment #4
cashwilliams commentedI could see this feature being useful as well.
Comment #5
damienmckennaComment #6
rgristroph commentedI took a look at this, I have made a bit of progress but no useful patch yet:
* I added the checkbox for new revision, and the log message text area, to the form when you are switching layouts, by copying that part of the form from node.pages.inc in the core node module.
* But that's not themed like the rest of the form
* And on the backend when you submit it, it doesn't do anything
My plan next is to make the submit function panels_change_layout_submit() in includes/display-layout.inc copy the checkbox value and log message into the $display variable in there, and then I still have to track down where it is actually saved.
--Rob
Comment #7
damienmckenna@rgristroph: if you submit what you have we might be able to collaborate.
Comment #8
rgristroph commentedHere's what I have so far. It's a patch to panels, not panelizer, specifically the includes/display-layout.inc file.
In panels_display_save() (in panels.module) the $display now has the info from the form, in $display->revision_information, about if the user wanted to create a new revision or not.
However I'm not sure exactly what to do at that point - it might not be the right place to handle the revisions at all.
I will be at Drupal Camp Asheville this weekend, if you happen to be there we could collaborate in person. I will have time to work on it further on Sunday.
Comment #9
damienmckennaThe patch provided was for Panels, not Panelizer.
Comment #10
damienmckennaMoving this to the IPE component.
Comment #11
cboyden commentedComment #12
dsnopekHere's a new patch against Panelizer (rather than Panels) which gets revisions for changing the layout in the IPE working for me. I haven't tested it super extensively and it could use some automated tests too.
Comment #13
cboyden commentedThe patch in #12 is working as expected in my testing.
Comment #14
dsnopekTurns out that "Change layout" with creating a new revision causes some bugs in IPE, so this Panels patch is necessary too: #2798831: IPE insufficient for Panelizer with new revisions on "Change layout"
Comment #15
cboyden commentedBeen using this patch, along with the one in #2798831: IPE insufficient for Panelizer with new revisions on "Change layout", for quite a while now and it's working well.
Comment #16
damienmckennaThat's fantastic, thanks for the update cboyden!
Comment #18
damienmckennaCommitted. Thank you.