Closed (fixed)
Project:
Skinr
Version:
6.x-2.x-dev
Component:
Panels
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2010 at 22:58 UTC
Updated:
12 Nov 2010 at 19:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
delykj commentedAccording to http://drupal.org/node/866184#comment-3408576 is there any progress to Skinr work with Panels regions?
Comment #2
moonray commentedI've got a patch for points 1. 2. and 4.
Please test and review with panels 3.5.
Comment #3
moonray commentedComment #4
jacineI started testing this on 3.7 with Skinr 1.x and it doesn't work for regions. I've been trying to figure out why for the last 1.5 hours and haven't been able to get past this yet, because:
theme_panels_skinr_style_render_region()so it's not looking up the skin information.$region_idis always empty.Comment #5
jacineComment #6
jacineAnd good thing it doesn't work, because as I'm figuring it out, I realize there is no skinr_flatten_skins_array() function in 1.x. Sigh.
Comment #7
jacineA database update is also needed for the variables table... 1.x.
Comment #8
jacineHere are 2 working patches for Panels 3.7 for 1.x-dev and 2.x-dev. Panels 3.7 has been out for 3 months now, so supporting the old version would be a waste.
I would like to commit this and roll a release for 1.x ASAP, but an update function for the variables table is still needed and I don't know how to do that.
Comment #9
jacineHere's an an example from the variables table for a theme named "skinr_one"
1. The variable is called skinr_skinr_one.
2. The value of it is:
a:1:{s:6:"panels";a:2:{s:21:"display-1-panel-left";a:3:{s:11:"test_select";s:0:"";s:11:"test_radios";s:0:"";s:15:"test_checkboxes";a:2:{s:24:"test-checkboxes-option-1";s:24:"test-checkboxes-option-1";s:24:"test-checkboxes-option-2";s:24:"test-checkboxes-option-2";}}s:16:"display-1-pane-1";a:3:{s:11:"test_select";s:0:"";s:11:"test_radios";s:0:"";s:15:"test_checkboxes";a:0:{}}}}In this example, the occurrences of "panel" need to change to regions, e.g.
Old:
"display-1-panel-left"New:
"display-1-region-left":)
Comment #10
ezra-g commentedHere's a re-roll for 1.x that includes updating variable values. I tested that this successful renames the sample variable that jacine provided, but it would be great to get some functional testing in another environment.
Comment #12
ezra-g commentedIt seems like all the 6.x-1.x patches are failing because this is marked as 6.x-2.x -- still needs review ;).
Comment #13
jacineOy, this isn't working :(
The changes in Ezra's patch (#10) work (they make the right changes), but for whatever reason, panels is ignoring it. When I go to edit a region that was changed during this upgrade, the Skinr form is empty as if I had never selected anything in the first place. And now when I try to re-apply settings to a pane, I'm getting:
Fatal error: Cannot use string offset as an array in /Users/jacine/Sites/drupal-6/sites/skinr-1.x/modules/skinr/skinr.module on line 476 (see screenshot for more on this).
Comment #14
moonray commentedThe variables are stored serialized in the db, so you can't go and just str_replace things in there. Attached patch fixes the conversion in install.
Also, I found that panes weren't getting their skinr classes attached, so a fix for that is here as well. (We might want to check the 2.x version as well to make sure it's working there).
Comment #16
moonray commentedLooks like skinr 2.x patch also didn't have a working pane style being set.
Comment #17
jacineHmm, panes were working for me in both, and now regions are not anymore in 1.x so far. I guess I'll have to diff the two patches to see what actually changed.
Comment #18
jacineErr, sorry never mind. My region style didn't apply properly. 1.x does work, which makes me very happy. Testing 2.x now.
Comment #19
jacineHere's what I found testing 2.x:
Before
- Regions were broken, so of course nothing was displaying but the same 2 classes were applied.
- The following classes were printed on panes:
panel-pane pane-custom pane-1 test-checkboxes-option-1 test-checkboxes-option-2 skinr-region skinr-id-1 skinr-region-processedAfter
- Regions work properly, classes print out once like they should.
test-checkboxes-option-1 test-checkboxes-option-2- Styles for panes print twice.
panel-pane pane-custom pane-1 test-checkboxes-option-1 test-checkboxes-option-2 test-checkboxes-option-1 test-checkboxes-option-2 skinr-region skinr-id-1 skinr-region-processedThe extra classes do not go away after:
- Clearing the cache.
- Re-saving the form via Panels.
- Re-saving the form via Dialog.
Before
After
So, it seems all that's left is stopping these classes from printing twice on panes.
Comment #20
jacineI could have sworn I included that in the patch, but I didn't. It was my fault. :( This is what I'm still seeing:
In panels.skinr.inc:
In skinr.inc:
Comment #21
moonray commentedI used the last available patch by ezra as my base. That patch must have reverted some of your changes.
Comment #22
jacineOk, here's 2 patches that I think cover all of it. The reason I was getting the classes twice was because I was printing
$skinrinpanels-pane.tpl.php, and that variable contains the styles too. Not so hot consistency wise, but we may be better off leaving this be. :/Comment #23
moonray commentedYou've got a dsm() stuck in your 2.x patch, but otherwise they the 1.x and 2.x patches are good.
Remove the dsm() and we're good to go, I think.
Comment #24
jacineGreat, I fixed the dsm and committed, finally! Thank you :)
http://drupal.org/cvs?commit=439850
http://drupal.org/cvs?commit=439848
Comment #25
elviento commentedI have Panels 3.7, Ctools 1.7, and Skinr 1.5 installed. Does this allow one to 'Edit' content in the Panel and make it persistent ("keeps changes")?? ... I've been having issues making changes to my Panel ever since my upgrade of Panels/Ctools/Skinr. Just want to verify this happens to someone else before applying the patch, it is not clear!? Thanks.