Using Display suite. Display two field views that have flexslider. one of flexslider is broken.

Solution not generate slide per ID , attach slide to class

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Regnoy created an issue. See original summary.

GrantI’s picture

I had a situation where my homepage had two separate views outputting two separate flexsliders. Initially I only had one view/flexslider on the page and this worked well and was stable. However, once I added the second view/flexslider to the page the following happened. Both flex sliders would work when page loaded for the first time, however if you refreshed the page twice both completely broke; the first was a total mess and the second just dropped out altogether. The only way to fix them was to clear the Drupal cache. I spent hours trying to debug and in the end discovered that the first view was using caching (set via the 'Advanced' tab of the 'View' edit page). Once I switched this off the caching and cleared the Drupal cache both worked fine and are now stable.

N.B. Please note this isn't to do with and isn't effected by the 'Performance' caching for the entire site, defined by the Drupal Core.

I hope this helps someone, this wasted hours of my life and I just hope to save someone else the same fate!

Vladimir-K’s picture

Here is a patch for deciding not to generate a slide by id, attach a slide to the date attribute.

rutel95’s picture

Status: Active » Needs review

This patch #3 works for me! Thanks!

Utilvideo’s picture

Status: Needs review » Reviewed & tested by the community
minorOffense’s picture

I don't understand how using the data attribute instead of the ID fixes a caching problem with the view? Drupal tracks the ids in use so they should increment normally. If you can explain that I'll consider merging this in.

rwilson0429’s picture

I'm having the same issue. Flexslider won't show up on any page that has another view on it. This patch did not resolve the issue for me.

amaria’s picture

Title: FlexSlider not working if use two views » FlexSlider not working if use two views with Display Suite
Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

I’ve changed the title to better reflect the issue as I understand it. This needs a test or at least a more detailed explanation of the problem and solution before merging.

@GrantI caching is a separate issue than this.

@minorOffense, I think the patch applies to the original issue concerning the use of FlexSlider with DS as opposed to caching.

@rwilson0429 please create a separate issue with some details about your setup