Conditional javascript isn't loading correctly with the 2.x dev release of Skinr. For example I am trying to get two blocks side by side in the same region to have the same heights.
When using the 1.5 version of Skinr and setting the two blocks to "Equal heights" it works correctly. Doing the same thing but with Skinr 2.x dev the "Equal Heights" setting has no effect and no javascript is loaded into head. It's as if it completely skips that part and ignore all the javascript that is to load based on the Skinr class present.
To test this yourself download any Fusion based theme (in my testing I used Acquia Slate). Place two blocks in the same region and choose the Skinr style "Equal heights" for each of the blocks in that region. You should see a class of "equal-heights" on the blocks to be sure it is enabled correctly. Now look at the head of your HTML output.. no mention of the equal heights script.
Another thing is the Skinr style "Horizontal user login block" doesn't display the overlabels correctly. This too is controlled by javascript as it loads the labels for the username and password text on top of the input fields and hides when clicked. This works with Skinr 1.5 but not with the 2.x dev release. Again this isn't loading the javascript required for it to work correctly. Both of these Skinr styles are applied through Fusion Core and are not in the sub-themes but from core itself.
So something within Skinr 2.x dev release seems to be limiting the display of the javascript files required for this theme and is probably affecting other themes out there that work this way with the conditional javascript. If there is any more information or screenshots you would like to see please let me know.
Below is the code for the "Equal Heights" Skinr style in Fusion Core's .info file:
; General style - Equal heights
skinr[fusion-equal-heights][title] = Equal heights
skinr[fusion-equal-heights][type] = checkboxes
skinr[fusion-equal-heights][description] = Make blocks in a region the same height
skinr[fusion-equal-heights][features][] = block
skinr[fusion-equal-heights][features][] = panels_display
skinr[fusion-equal-heights][features][] = panels_pane
skinr[fusion-equal-heights][features][] = panels_panel
skinr[fusion-equal-heights][scripts][] = js/jquery.equalheights.js
skinr[fusion-equal-heights][options][1][label] = <span class="preview-text">Equal heights: equalize the heights of blocks with this style in the same region <span class="preview-icon" id="fusion-general-styles-equal-heights"></span></span>
skinr[fusion-equal-heights][options][1][class] = equal-heights
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | skinr_basethemes.patch | 3.53 KB | moonray |
Comments
Comment #1
Poieo commentedSubscribing...
Comment #2
nomonstersinme commentedI can't replicate this problem. For me skinr is loading my files as it should. I wonder if theres some other module that may be interfering with skinr on your install.
Have you tried this on a clean install with just the skinr required modules?
Comment #3
Poieo commentedI can confirm that this does not work on a clean install.
I installed a clean version of D6.17 with only the Skinr2 required modules and the equal heights setting does not work.
You can view the test site here: http://www.poieochurch.com/skinrtest/
Equal heights are set on the two blocks at the bottom of the page.
Comment #4
jeremycaldwell commented@nomonstersinme, yes I have tried with a clean install of Drupal 6.17 and the Skinr2 dev module and required modules. No luck..
Comment #5
nomonstersinme commentedI just tested all of @eternalistic's use cases as stated in the first post and for me the issue does not occur where my drupal version is 6.16. Update to 6.17 and now I'm seeing these errors.
Hope that helps bala! :)
Comment #6
osmanSimilar issue with Skinr 6.x-1.5.
I have Fusion 6.x-1.0 as a base theme on Drupal 6.17.
When I use equal heights for the blocks in same regions, jquery.equalheights.js is added to HEAD after fusion/fusion_core/js/script.js
So, because of this wrong load order, equalheights is not working. The function, calling equalheight is in fusion_core/js/script.js file.
Here is the order of scripts from HEAD:
Comment #7
moonray commentedThis is a fusion issue. If you're including conditional javascript, you can't expect non-conditional js to depend on it. Another js file needs to be added to load conditionally, after jquery.equalheights.js which contains all the code depending on the equalheights javascript.
Comment #8
jeremycaldwell commentedThanks for taking a look at it moonray, will do some more investigating on our end.
Comment #9
stephthegeek commentedDid someone confirm the actual original issue here (conditional JS not loading) has been fixed in Skinr/Drupal 6.19? The later issue posted about the order of files loading should be filed as a separate (Fusion) issue but that's not what this issue is about.
Comment #10
moonray commented(removed this message)
Comment #11
moonray commentedFound the issue and created a patch. Please test.
Comment #12
Poieo commentedWorks well for me. Height is now being applied to 'equal-heights' blocks.
Comment #13
moonray commentedThanks for testing.
Comment #14
moonray commentedCommitted to CVS.