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
CommentFileSizeAuthor
#11 skinr_basethemes.patch3.53 KBmoonray

Comments

Poieo’s picture

Subscribing...

nomonstersinme’s picture

I 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?

Poieo’s picture

I 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.

jeremycaldwell’s picture

@nomonstersinme, yes I have tried with a clean install of Drupal 6.17 and the Skinr2 dev module and required modules. No luck..

nomonstersinme’s picture

I 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! :)

osman’s picture

Similar 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:

<script type="text/javascript" src="/sites/all/modules/contrib/jquery_update/replace/jquery.min.js"></script>
<script type="text/javascript" src="/misc/drupal.js"></script>
<script type="text/javascript" defer="defer" src="/sites/all/modules/contrib/admin_menu/admin_menu.js"></script>
<script type="text/javascript" src="/sites/all/themes/fusion/fusion_core/js/jquery.bgiframe.min.js"></script>
<script type="text/javascript" src="/sites/all/themes/fusion/fusion_core/js/hoverIntent.js"></script>
<script type="text/javascript" src="/sites/all/themes/fusion/fusion_core/js/supposition.js"></script>
<script type="text/javascript" src="/sites/all/themes/fusion/fusion_core/js/supersubs.js"></script>
<script type="text/javascript" src="/sites/all/themes/fusion/fusion_core/js/superfish.js"></script>
<script type="text/javascript" src="/sites/all/themes/fusion/fusion_core/js/script.js"></script>
<script type="text/javascript" src="/sites/all/themes/my_theme/scripts/jquery.cycle.all.min.js"></script>
<script type="text/javascript" src="/sites/all/themes/my_theme/scripts/jquery.toggleval.js"></script>
<script type="text/javascript" src="/sites/all/themes/my_theme/scripts/local.js"></script>
<script type="text/javascript" src="/sites/all/themes/fusion/fusion_core/js/jquery.equalheights.js"></script>
moonray’s picture

Project: Skinr » Fusion
Version: 6.x-2.x-dev » 6.x-1.x-dev

This 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.

jeremycaldwell’s picture

Assigned: Unassigned » sociotech

Thanks for taking a look at it moonray, will do some more investigating on our end.

stephthegeek’s picture

Project: Fusion » Skinr
Version: 6.x-1.x-dev » 6.x-2.x-dev
Assigned: sociotech » Unassigned

Did 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.

moonray’s picture

(removed this message)

moonray’s picture

Status: Active » Needs review
StatusFileSize
new3.53 KB

Found the issue and created a patch. Please test.

Poieo’s picture

Works well for me. Height is now being applied to 'equal-heights' blocks.

moonray’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for testing.

moonray’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.