Closed (fixed)
Project:
Panopoly
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Aug 2012 at 15:25 UTC
Updated:
15 Oct 2012 at 19:51 UTC
Jump to comment: Most recent file
Hey @populist,
I was wondering if it is possible to get the preview functionality to work with the panels_edit_style_settings_form
Right now the preview works for:
a) _content_type_edit_form
b) panels_edit_style_type_form
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | 1734772-style-setttings.patch | 4.64 KB | beeradb |
| #17 | 1759222-live-preview.patch | 3.84 KB | beeradb |
| #16 | 1734772-style-setttings.patch | 4.63 KB | beeradb |
| #11 | ImageAttachment.png | 127.67 KB | sylus |
| #8 | 1734772-moar-preview.patch | 742 bytes | beeradb |
Comments
Comment #1
populist commentedDelegated!
Comment #2
beeradb commented@sylus: any chance you can direct me to the easiest way to find this form? Is this for panels styles which have configurable options?
Comment #3
populist commented@sylus: my guess this is going to work exactly the same way to the initial style form. here is a patch that extends panopoly_magic's magic. give it a test!
Comment #4
populist commentedI went ahead and pushed this out. Give the latest -dev a review to make sure it works for you.
Comment #5
sylus commentedThanks for taking a look at this @populist unfortunately it is still not showing up for me, I'll take a further look tomorrow to make sure not something I did wrong :)
Comment #6
populist commentedComment #7
sylus commentedI tested it further out and looks like something must still be missing for this to fire. All of the functions in the patch were run though.
An example of my settings form for one of my panes is as follows:
Comment #8
beeradb commented@sylus: give this one a try? it fixes the issue for me on my local.
Comment #9
populist commentedI checked this out and looks good too. Rolling it into -dev for further review.
Comment #10
sylus commentedWorks for me :) Thanks so much!!!
Comment #11
sylus commentedHey :)
Really appreciate the work done on this so far but there is still a problem with this functionality.
While the preview does now work it does not take into account and breaks change in the settings form.
I have attached a picture. Basically when I change styles from 1-7 different classes get applied to my pane. With the new code addition these classes never get applied. Reverting the changes everything works again.
Comment #12
sylus commentedCan still confirm this on latest dev, that none of the styles are being applied, setting in panopoly_magic_form_alter
to
Fixes the problem but removes the preview.
Comment #13
sylus commentedI did notice that where we have the following statement again in wetkit_magic.module:
That I think it should be:
Which despite the preview not updating the correct styles do now get passed.
Comment #14
populist commentedThe problem here is that in panopoly_magic_form_alter() there is a section that determines the style for the pane as referenced in #13. At issue is on a settings form, the way the style plugin is passed is different. In the example from #7, the style is actually in $form_state['style'] directly and elsewhere it needs to be loaded. This just needs smarter handlng.
The cases we need to cover:
-- stylizer (across various use cases)
-- style plugins with settings (both when loaded for the first time and when auto submitted during preview)
-- style plugins without settings
Comment #15
beeradb commentedI've looked into this a fair bit as well, and there are actually 2 different issues at play. The outline in #14 are the steps needed to get preview working. A secondary issue is that once the "update preview" button is clicked (or auto submitted) the form no longer saves correctly. In fact the "tabbed interface" selection from step 1 even reverts to the first selection in the list.
This could potentially be tied to the $form_state['style'] wackiness described in #14, but I wanted to make sure it was documented here so when we fix this we make sure to knock out both items at once.
Comment #16
beeradb commentedThis ended up being a combination of several things. The behaviors listed in #14 and #15 were present, but layered on top of a panels form caching bug. This patch fixes the preview behavior, and there's a patch over at #1797298: Form caching cause references to break, preventing save of stylizer settings forms which fixes the panels bug.
Here's hoping this one is behind us :)
Comment #17
beeradb commentedNoticed a typo in the comments, attached patch fixes it.
Comment #18
beeradb commentedAck. wrong patch. I really should clean up my patches directory so I don't have dozens to choose from.
This one fixes the typo.
Comment #19
populist commentedI made a few updates to the patch in #18 to put the selection settings in a fieldset, but otherwise it looks good. I was doing my testing from the settings plugin that stylus provided as an example, but presumably this will need a bit more testing around all use cases. For now, however, this has been committed and pushed into -dev.
Comment #20
sylus commentedCan confirm this works though had to add the patch from panels that @beeradb made in: http://drupal.org/node/1797298
I can't say how much I appreciate you guys taking the effort to solve this! Much obliged :)
Comment #21
populist commentedLovely! I will make sure to get that patch rolled in the make file as well.
Comment #22
populist commentedI pushed up this patch to Panopoly Core's makefile and updated the Panels issue to RTBC. Good to go!