Hi, I found that the CSS for this module is not included when CSS aggregation is on. It wants to include the CSS file from the modules folder, not from the theme folder where you are supposed to include it.

Have a look at the screenshot showing a part of the jQuery.extend(Drupal.settings..) where it specifies which CSS files to include. If CSS cache / aggregation isn't enabled this works just fine.

CommentFileSizeAuthor
ddblock-css-cache.png35.14 KBvegardjo

Comments

ppblaauw’s picture

Status: Active » Postponed (maintainer needs more info)

You could try to change 'every page' to TRUE in the views-slideshow-ddblock-main-frame--vsdupright30p.tpl.php file so the css is included in aggregation:

Change:

// add Cascading style sheet
drupal_add_css($directory . '/custom/modules/views_slideshow_ddblock/' . $settings['template'] . '/views-slideshow-ddblock-cycle-' . $settings['template'] . '.css', array('group' => CSS_THEME, 'every_page' => FALSE));
drupal_add_css($directory . '/custom/modules/views_slideshow_ddblock/' . $settings['template'] . '/' . $slideshow_width .  '/views-slideshow-ddblock-cycle-' . $settings['template'] . '-' . $slideshow_width . '.css',  array('group' => CSS_THEME, 'every_page' => FALSE));
?>

to

// add Cascading style sheet
drupal_add_css($directory . '/custom/modules/views_slideshow_ddblock/' . $settings['template'] . '/views-slideshow-ddblock-cycle-' . $settings['template'] . '.css', array('group' => CSS_THEME, 'every_page' => TRUE));
drupal_add_css($directory . '/custom/modules/views_slideshow_ddblock/' . $settings['template'] . '/' . $slideshow_width .  '/views-slideshow-ddblock-cycle-' . $settings['template'] . '-' . $slideshow_width . '.css',  array('group' => CSS_THEME, 'every_page' => TRUE));
?>

Hope this helps you further, please let me know.

vegardjo’s picture

Status: Postponed (maintainer needs more info) » Active

Thanks, got it to work, but I'm not seeing the same as you here. You have two drupal_add_css functions where I only have one, and you have a different syntax than me. I have:

// add Cascading style sheet
drupal_add_css($directory . '/custom/modules/views_slideshow_ddblock/' . $settings['template'] . '/views-slideshow-ddblock-cycle-' . $settings['template'] . '.css', 'template', 'all', FALSE);

However, changing this to your syntax:

// add Cascading style sheet
drupal_add_css($directory . '/custom/modules/views_slideshow_ddblock/' . $settings['template'] . '/views-slideshow-ddblock-cycle-' . $settings['template'] . '.css', array('group' => CSS_THEME, 'every_page' => TRUE));

(it actually works with both every_page set to TRUE and FALSE now..)

Seems like one of us is looking at the wrong file? I do believe I downloaded the 7.x theme pack from the correct place, but I might be wrong?

ppblaauw’s picture

Assigned: Unassigned » ppblaauw
Status: Active » Needs work

You are right.
I have a newer version of the slideshow themes, which is not uploaded to ddblock.myalbums.biz.
Will upload them soon.

ParisLiakos’s picture

subscribe.Aggregation from Performance page under configuration breaks the slideshows

ppblaauw’s picture

You can change in the views-slideshow-ddblock-main-frame--vsduprightxxp.tpl.php file (replace xx with the slideshow theme version used):

// add Cascading style sheet
drupal_add_css($directory . '/custom/modules/views_slideshow_ddblock/' . $settings['template'] . '/views-slideshow-ddblock-cycle-' . $settings['template'] . '.css', 'template', 'all', FALSE);

into

// add Cascading style sheet
drupal_add_css($directory . '/custom/modules/views_slideshow_ddblock/' . $settings['template'] . '/views-slideshow-ddblock-cycle-' . $settings['template'] . '.css', array('group' => CSS_THEME, 'every_page' => FALSE));

to exclude the css from the aggregation
or

// add Cascading style sheet
drupal_add_css($directory . '/custom/modules/views_slideshow_ddblock/' . $settings['template'] . '/views-slideshow-ddblock-cycle-' . $settings['template'] . '.css', array('group' => CSS_THEME, 'every_page' => TRUE));

to include the css in the aggregation

ParisLiakos’s picture

tried but not working.
i will take a closer look when i can.javascript is working OK only css isnt there.
i ll have to check the aggregated css file to see if its included.
and if it is,why not working

jbova’s picture

The last section of code from #5 worked.

// add Cascading style sheet
drupal_add_css($directory . '/custom/modules/views_slideshow_ddblock/' . $settings['template'] . '/views-slideshow-ddblock-cycle-' . $settings['template'] . '.css', array('group' => CSS_THEME, 'every_page' => TRUE));

ParisLiakos’s picture

I can confirm its working.disregard #6, i was changing the line in wrong template:/
Thanks!

jawi’s picture

changing '.css', array('group' => CSS_THEME, 'every_page' => FALSE)); into >>>>>
'.css', array('group' => CSS_THEME, 'every_page' => TRUE));

Worked for me.

jlea9378’s picture

I was having a problem where the CSS wasn't loading when I was authenticated, even with CSS aggregation disabled. It would work for anonymous users though.

Enabling CSS aggregation broke it for anonymous and it remained broken when logged in.

However, the above fix resolved both issues! =)

jlea9378’s picture

Status: Needs work » Reviewed & tested by the community

RTBC?

jawi’s picture

Had some trouble on a new d7 installation

#5 fixed the caching problem.

damienmckenna’s picture

Status: Reviewed & tested by the community » Active

This needs an actual patch in order for it to be marked RTBC.

damienmckenna’s picture

FYI this is true of many DDBlock's template files, not just for this submodule.

labboy0276’s picture

I can confirm #5 works as well, the code that I inherited with this site I am fixing was a little bit different, but the same:

drupal_add_css(drupal_get_path('module', 'views_slideshow_ddblock') . '/css/views-slideshow-ddblock-cycle-vsddefault.css', array('group' => CSS_THEME, 'every_page' => TRUE));