I just noticed that the CSS selector for block-commerce-cart-cart (module commerce_cart) is "#block-commerce_cart-cart .block-icon [..]" and it obviously doesn't work.

In my opinion the style should be built like this: in block_icons.module
Line 439: $css = '#'. $block_icon['block_html_id'] .' .block-icon {

Function block_icons_preprocess_block can find the block html id in $variables['block_html_id'] and add it to the $block_icon array.

I did a quick test on my system, it works.

Comments

daffodilsoftware’s picture

Assigned: Unassigned » daffodilsoftware
Status: Active » Fixed
StatusFileSize
new1.36 KB

Hi tito
You were right that this issue existed and the solution that you proposed is also working and fine so I have created a patch for the same and attaching it here.

daffodilsoftware’s picture

Status: Fixed » Closed (fixed)
daffodilsoftware’s picture

Status: Closed (fixed) » Patch (to be ported)
jardasmahel’s picture

Patch before didn't worked for me. Probably it is for older version of module so i made new one.

daffodilsoftware’s picture

Jardasmahel ,You are right that the patch I wrote was for dev branch. So I will port the changes to both branch soon.

radimklaska’s picture

I tested patch in #4 against 7.x-1.2. Works fine. Thanks!

daffodilsoftware’s picture

Status: Patch (to be ported) » Closed (fixed)

Hello Jardasmahel, I have committed cssidselector-1789182-1.patch on dev branch. I tried to commit your patch on 7.x-1.x-dev and 7.x-1.2 but this is giving error. Here is the error description:

error: while searching for:
$block_icon['block_class'] = 'has-block-icon block-icon-'. $location .' block-icon-'. $position;
$block_icon['module'] = $module;
$block_icon['delta'] = $delta;
// Add icon variables to block so themers can use them
$variables['block_icon'] = $block_icon;

error: patch failed block_icons.module:405
error: block_icons.module: patch does not apply

Anonymous’s picture

Version: 7.x-1.3 » 7.x-1.2

committed dc317bd and fixed in 7.x-1.3.Thanks !

Anonymous’s picture

Version: 7.x-1.2 » 7.x-1.3