The use_pager setting is getting lost.
When looking into it, see that panopoly is moving a bunch of settings under the #tree fieldset 'exposed' and then trying to look for that value in various places. Since exposed is a #tree, values under it are are given the name exposed[value]. However, using the #parents property, can override that and set it back so name will appear as specified, e.g. #parents = array('use_pager') will use the name 'use_pager' and #parents = array('exposed', 'sort_by') use the name exposed[sort_by].
So patch does that, cleanup the submission function and anywhere looking for [exposed] unnecessarily.
An alternate solution would be to make a new fieldset and put all items under it, but this presently looked like less a change/easier to test.
Comments
Comment #1
hefox CreditAttribution: hefox commentedHad a #parent instead of #parents for one
Comment #2
hefox CreditAttribution: hefox commentedone more bug meaning widget_title not saving
Comment #3
hefox CreditAttribution: hefox commentedheader type wasn't working
Comment #4
mpotter CreditAttribution: mpotter commentedUsing this in Open Atrium 2.
Comment #5
mpotter CreditAttribution: mpotter commentedNeeded to reroll this for Panopoly rc5. Here is the combined 2016643 and 2016527 patch again.
Comment #6
mpotter CreditAttribution: mpotter commentedSince this is a complex patch, moving it back to Needs Review for RC5 testing.
Comment #7
mpotter CreditAttribution: mpotter commentedHrm, messy. Now this conflicts with #2017159: Panopoly Magic: render preview outside of pane configuration form.
So we've basically got 3 patches that conflict. Need somebody to sort this out and either get this back into 3 different patches, or post a rollup patch of all 3 issues.
Comment #8
hefox CreditAttribution: hefox commentedI'm not able to reproduce the issue with applying patches, at least in this order (switching order does get a conflict I think)
Comment #9
dsnopekAdding the "sprint" tag - we're going to focus on this for the next release!
Comment #10
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commentedThis appears to be covered by the patch pending over on #2097199: Views pager settings do not stick. - but on that patch I just fixed the broken form array locations so it's very simple compared to the approach here.
Not sure why the fix/cause is as complex as this issue implies... Can someone explain? And ideally mark the linked issue as a dupe if we think it is (and the patch there has no merit).
Comment #11
hefox CreditAttribution: hefox commentedThis patch is longer, but makes the code more readable/manageable
Comment #12
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commentedThen why not commit the quick fix patch now, then continue working on this clean-up separately? It's broken now, after all...
Comment #13
dsnopek@Jim Kirkpatrick: That's a possibility!
The advantage of this patch is that it's been used in Open Atrium for months so it's gotten a lot of testing. That said, no one outside of the Open Atrium team has gotten a chance to give it a real detailed review yet. However, I intend to try and fit it in before the 1.0 release!
In any case, I'll look at the simpler one too when I get around to it. :-)
Comment #14
dsnopekSomething wonky is going on with the patches on this issue, which I'm attempting to unravel.
First of all, only @hefox's patch in #1 and #2 actually solve the issue described here using the approach mentioned in the issue description.
@hefox's two patches on #3 actually look like it's some version of the patch from #2016643: Panopoly magic: Undefined index row_classes, group: use hook_view_pre_view instead of hook_views_pre_render and doesn't solve the pager issue or even resemble approach described.
Then @mpotter's patch on #5, looks like the patch from #3 plus a whole bunch of unrelated code style fixes (removing whitespace at the end of line). This one also doesn't fix the pager issue.
And it's actually the patch from #5 that's included in OpenAtrium!
So, as an attempt at review: I really like the patch at #2 and the approach that @hefox chose - it's way simpler than trying to move all those form elements around and then pull the values from the multiple places they could be at. I'm going to try and give this some more review and see if I can pull all the Panopoly Magic patches into a coherent whole. :-)
Comment #15
dsnopek@hefox: Do you have a newer version of the patch from #2 laying around somewhere?
Since that's the newest one that actually fixes the issue, that's what I'm going to work off of. However, it does have some problems! The following fields will get saved (ie. you can edit the setting again and see the right value), but they won't actually get reflected in the view when it's rendered:
If you can fix those issues, I'll definitely commit this because your approach is way cleaner than what's currently in Panopoly Magic. However, in the meantime, I'm going to commit the patch at #2097199: Views pager settings do not stick..
Thanks!
Comment #16
dsnopekUpdated title now that the pager issue has been fixed in another way.
Comment #17
hefox CreditAttribution: hefox commentedNot ATM and not currently working on a project that uses panopoly, but might as well leave this open if me/someone else gets a chance
Comment #18
dsnopekOk, thanks! Here is a re-roll of @hefox's patch from #2, after the other patches committed to Panopoly Magic. Strangely, in testing it now after committing #2016643: Panopoly magic: Undefined index row_classes, group: use hook_view_pre_view instead of hook_views_pre_render, it appears to not have the problems I noted in #15. :-) So, either I did a bad job of testing last night or this patch was dependent on #2016643: Panopoly magic: Undefined index row_classes, group: use hook_view_pre_view instead of hook_views_pre_render.
Comment #19
dsnopekGave the re-roll of this patch another review! It caused some the visual improvements in panopoly-magic.css to stop working, so I got them working again. Otherwise, everything works and this actually fixes: #2154103: Live preview won't show the overridden title for a view
So, committed in 682cc47.