I can't see why, but it doesn't work with Acquia Prosper theme whereas it works well with other themes. I've checked with no compression, no cache, the js files are there, but the debugging is quite hard... Has anyone encountered this problem?

Comments

tahiticlic’s picture

Status: Active » Needs work

No one?

tahiticlic’s picture

Well, I've tried with another theme on another project, and this time there's no script included in the generated page.

I've looked in template_preprocess_views_cycle function and changed "footer" to "header" in drupal_add_js calls, that did the trick and now it works well.

I still can't figure why it's not working with Acquia Prosper...

[Edit] : template_preprocess_views_cycle is called twice, and this brings an incorrect transition. Why is this called twice? Maybe because it's a Acquia is a derivate theme of Fusion.
To avoid this, I had to modify views_cycle.theme.inc like this :

<?php
function template_preprocess_views_cycle(&$vars, $hook) {
  static $cycle_settings_already_set;
?>

and final lines :

<?php
  if ($cycle_settings_already_set!=1){
     // Key the settings for each instance of the cycle plugin by its cycle id.
     drupal_add_js(array('views_cycle' => array($vars['cycle_id'] => $settings)), 'setting', 'header');
     $cycle_settings_already_set=1;
  }?>
Crell’s picture

I've no idea why it's getting called twice. That sounds like a bug in the theme, not an issue with views_cycle. I've never worked with the affected themes.

tahiticlic’s picture

Yes you may be right, I think it's a feature of subthemes : function is called by the subtheme AND by the master theme. To be verified to know if the fix I propose is a good way to do.

Crell’s picture

It's not a problem with all subthemes; most of the sites I build use Zen subthemes and don't have that problem. Is the Prosper theme calling the view directly with a views_embed call or something?

tahiticlic’s picture

I don't think so, there's a fusion_core_preprocess_views_view function in the master theme "Fusion".

Crell’s picture

I've no idea then.

modctek’s picture

This is happening with Acquia_Marina as well, so it seems to be related to the way Fusion-based themes work, perhaps?

Crell’s picture

Can you ask someone from the fusion theme to come over and have a look? I am not a themer and have no clue what it could be doing that would break this module.

sociotech’s picture

Hi, I'm the Fusion developer.

I'm not familiar with Views Cycle, could you explain a bit more about what's happening that shouldn't be? Sounds like something is getting called repeatedly, which is causing some kind of problem, but I need a bit more info to investigate on my end.

Thanks.

Crell’s picture

@sociotech: Hello there!

My best guess from the comments above is that footer JS is not getting printed. That's just a guess, though. I've not reproduced the issue the OP mentions.

modctek’s picture

Very odd, all of a sudden, it's working in Acquia_Marina. Not sure what's changed, though I did drop back to an earlier version of Fusion (b4) due to an unrelated bug.

sociotech’s picture

Hey Crell :)

From what I can see footer (and $closure) are still getting printed in Fusion/Prosper.

We don't do anything strange with Views that I can think of.

But if someone would like to provide me with details about what is supposed to be happening (e.g., what's supposed to be loaded, executed, displayed, etc.) and what exactly is _not_ happening (and under what conditions), then I'll be happy to take a look.

Thanks.

duns’s picture

Hey there,

I'm experienced some kinds of trouble too but i've got it now working with Acquia Prosper on my live test site : http://www.cathydenis.com
(choose french language to view the cycle views in action inside a quicktabs : it's the section called "What's new" / "Quoi de Neuf").

Not sure why it's working for me but I'm also using the rotor block display wich use similar jscript and get it working too.

Perhaps take a look for a missing file inside reports from administration (i'm using jquery.cycle.all.js renamed to jquery.cycle.js inside directory module and before that I was having strange behavior (with rotor block the module work without the script installed :p for example)

definetely not an issue to be investigated for me.

Thanx for the good work
(have to find big fixes for ie display on my live site... :/)
Denis

modctek’s picture

This seems to be related possibly to Skinr, and more specifically to the latest 2.x-dev version or one of the jquery sub-modules it requires to run. My cycle view broke immediately upon testing the latest dev version of Skinr, and came back to life when I downgraded to 1.5.

Crell’s picture

Hm. Since I don't quite know what Skinr is or what it does, I'm not sure I can help much there. :-)

Crell’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)