I've been debugging the "Save as @bundle_name default" functionality, as we weren't sure which default it saved (entity root, or the actual view mode's default.) However while testing we found out it didn't actually save. The panelizer_defaults table had empty values all over the place.

The issue seems to be that this method invokes "ctools_export_crud_load" which only loads from the database and does not check for exported code (so perhaps this bug is only when Panelizer is featurized/exported.) By changing to "ctools_export_load_object" I was able to successfully change the view mode's default Panelizer configuration because it checked exported code.
Also, I had to change the naming discovery within the function. It duplicated the view mode twice, showing entity:bundle:view_mode:view_mode instead of entity:bundle:default:view_mode as items are actually exported.
Patch incoming.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | panelizerentitydefault-2328615-1.patch | 1.14 KB | mglaman |
| Screen Shot 2014-08-27 at 9.45.36 AM.png | 52.75 KB | mglaman |
Comments
Comment #1
mglamanPatch attached. Will continue testing on our own product as well as within Panopoly and other distributions which utilize Panelizer but hide this feature (any Panopoly based distro.)
Comment #2
mglamanReferencing Panopoly issue which spawned this: #2277063: Put back "Save Default" for Panelizer IPE
Comment #3
mglamanPutting to proper version :)
Comment #4
mcrittenden commentedPatch is quite simple and looks good, and fixes the bug on my end. Moving to RTBC.
Comment #5
mglamanUpdating title, as this is an issue when the Panelizer config is exported into code.
Comment #6
damienmckennaCommitted. Thanks mglaman for the patch and mcrittenden for the review.