Closed (outdated)
Project:
Facet API
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jun 2012 at 11:55 UTC
Updated:
24 Sep 2019 at 22:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cpliakas commentedThis is probably because the javascript that converts the links to checkboxes is added in the block rendering logic which is not executed when the block is cached. Therefore it is not added when the data is cached.
Thanks for posting,
Chris
Comment #2
cpliakas commentedLooks like the technique at http://www.jaypan.com/tutorial/adding-css-and-js-cached-block-drupal-7 should fix the issue.
Comment #3
cpliakas commentedThe attached patch moved the JS including into an #attached property.
Comment #4
cpliakas commentedRe-thinking location of the #attached so it is in the base widget class.
Comment #5
cpliakas commentedBumping to first page.
Comment #6
cpliakas commented#4: checkboxes-with-cache-1621034-4.patch queued for re-testing.
Comment #7
cpliakas commentedCommitted to 7.x version of Facet API.
Comment #9
CSoft commentedI still have this problem. To solve it, I changed the line of code in adapter.inc from:
to:
It works for me perfectly.
Comment #10
antonnaviI confirm this bug (also reproduce it).
Solution from comment #9 works fine for me.
It also fix issue with soft limit show/hide link disappearing when block cache is enabled.
Thank You CSoft!
Comment #11
gaëlgThis works for me too.
Comment #12
damienmckennaThe code from #9 turned into a patch. There are probably other drupal_add_js() calls, and some drupal_add_css_() calls that need fixing, this should do for now.
Comment #13
frjo commentedI had the same issue and patch #12 fixed the problem.
I found a problem with CSS as well and attach a extended patch that takes care of that as well.
Comment #14
kitikonti commentedsame problem and #13 works for me
Comment #15
eugene.ilyin commentedStrange, but I cannot reproduce this problem. Maybe it's not actual? I've checked it with the dev version.
Comment #16
brockfanning commented@eugene.ilyin: For me patch #13 (thank you!) is still needed even with the latest dev version. Here's what I'm doing to recreate the problem:
So the javascript gets loaded the first time, but not successive times - which makes sense if the javascript is not added with '#attached' and the block has been cached.
Comment #17
tlwatsonAttached an update of patch #13 with line numbers compatible to version 1.5+30-dev.
Comment #18
tlwatsonFixed as of 7.x-1.6 - see https://www.drupal.org/project/facetapi/issues/3057283