Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#3 | flexslider_init_data_attr_2871177_3.patch | 1.72 KB | Vladimir-K |
Comments
Comment #2
GrantI CreditAttribution: GrantI commentedI 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!
Comment #3
Vladimir-K CreditAttribution: Vladimir-K commentedHere is a patch for deciding not to generate a slide by id, attach a slide to the date attribute.
Comment #4
rutel95This patch #3 works for me! Thanks!
Comment #5
Utilvideo CreditAttribution: Utilvideo commentedComment #6
minorOffense CreditAttribution: minorOffense at Coldfront Labs Inc. commentedI 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.
Comment #7
rwilson0429 CreditAttribution: rwilson0429 commentedI'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.
Comment #8
amaria CreditAttribution: amaria commentedI’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