Closed (fixed)
Project:
Panopoly
Version:
7.x-1.x-dev
Component:
Theme
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Jul 2015 at 20:21 UTC
Updated:
27 Jul 2015 at 13:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hart0554 commentedPatch attached
Comment #2
hart0554 commentedJust realized this patch isn't quite going to work because it's going to read '0' as empty. I'll rework this and upload a fix.
Comment #3
dsnopekThanks for the report and working the patch! :-)
This will probably also need a
hook_update_N()to change the value for existing sites that have -1 already saved.Marking as Critical because this is a regression.
Comment #4
dsnopekComment #5
hart0554 commentedI'm not 100% sure I know how to go about updating that setting with a hook_update_N, I'd be interested in seeing how someone tackles that. What I've done with this updated patch is account for negative int values by assuming that the intention is actually to have no active accordion sections, since that's been the described behavior of the setting previously. It doesn't leverage the ability to use negative indexes that jQUI provides, but at least preserves existing '-1' behavior.
I can see the utility of potentially being able to say you want the active accordion section to be the last of n, but will have to leave the more sufficient solution to someone who understanding implementing update hooks better than I do.
Comment #6
hart0554 commentedUpdate again because the above version forgot to account for blank value.
Comment #7
Lowell commentedTested patch #6, works as expected.
Does require the "Can close all section" checkbox to be checked.
Comment #8
dsnopek@Lowell: Thanks for testing!
@hart0554: I think your solution to not having a
hook_update_N()function is fine! However, since we are now preserving the -1 behavior, maybe we should just continue saying that -1 is what you use to say that we want no pane active? Also, the patch appears to allow you to specific the string 'false' as an option, which doesn't seem necessary. Maybe we could just check specifically for a value of -1? So, instead of:... we could do:
Then we can keep the old description as well.
How does that sound?
Comment #9
hart0554 commentedOkay, here's an updated patch with the suggested solution.
Comment #11
dsnopekLooks good, thanks! Committed. :-)