Closed (fixed)
Project:
AddToAny Share Buttons
Version:
7.x-4.7
Component:
User interface
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Oct 2011 at 10:38 UTC
Updated:
7 Aug 2015 at 21:44 UTC
Jump to comment: Most recent
Comments
Comment #1
micropat commentedNo other reports, and cannot reproduce yet. What are your settings in admin/config/development/performance?
Comment #2
ace11 commentedThis happens to mee too. Very strange behavior.
And also noticed that this same thing happens with 7.x-4.0 version.
Comment #3
ezman commentedI am seeing this too with 7.x-4.0
Performance settings are all checkboxes checked and dropdowns have 'none' selected.
If I clear all caches then the anonymous user can see the popup on the first page requested. Other pages do not show the popup. Revisiting the first page shows the popup.
I tried manually adding the script that creates the da2a object to my theme's script.js. The error in the javascript console about da2a not being defined goes away, but the popup still does not display.
Unchecking 'aggregate javascript files' does not fix the issue.
Unchecking 'cache blocks' appears to fix this issue for me. My AddToAny popup is in a block.
Comment #4
AshleyWilde69 commentedI also have the block randomly disappearing. One minute its there the next its not displayed. Refresh and its there again. Then gone on the next page. Very frustrating.
Ashley :)
Comment #5
tim_djI've a similar problem. I have two addtoany blocks. One is added in a View. The other is normal addtoany block inserted through contexts.
When I clear text they are both visible. After that the bottom one is missing (the one inserted through context) using 7.x-4.5
Comment #6
tim_djI've figured out what my problem was. I had views cache. Output and query cache where on 5 minutes. This means the output of _addtoany_create_button() gets cached. Which causes it only to work after emptying cache because it won't execute the code in _addtoany_create_button() again with cache.
Comment #7
emilflatz commentedAddToAny block disappeared when I enabled cache block option in performance settings.
I installed Block Cache Alter, and on the block list page disabled the cache on AddToAny block.
Block reappeared again.
Comment #8
tim_djJavascript and css should be attached to block using #attached instead of doing it with drupal_add_js otherwise they won't be reloaded when block is in cache.
Comment #9
shane birley commentedConfirmed. Cache turned on, block disappears. Cache turned off either via Drupal performance or via Block Cache Alter it appears.
Comment #10
micropat commentedSwitched to
#attachedas part of today's dev release.Please try it and report back!
Comment #11
micropat commentedShould be fixed in 7.x-4.6 since
drupal_add_functions are replaced with#attached.Comment #13
shane birley commentedConfirmed.
Comment #14
jamix commentedUsing 7.x-4.6 over here and the problem still exists. FYI,
#attachedstill works viadrupal_add_under the hood.Comment #15
robertragas commentedYeah, I had the same problem. What I did was use hook_block_info_alter to turn off the caching for the addtoany block and then it worked.
Maybe just turn off the caching in the hook_block_info? Not sure if it would impact performance alot.
Comment #16
emanuelrighetto commented@Robert Ragas is right. And also his implementation of hook_block_info_alter() solves the problem of inline script when caching is on.
Comment #17
russellb commented+1 for switching off the block cache on the add to any block
#15 is solving this for me so far
Comment #18
caspervoogt commentedConfirming this issue for 7.x-4.7 as well, and Robert's code solves it, though I think the Add To Any module's addtoany_block_view function should be adjusted to include the renderable array including CSS and JS, rather than using addtoany_page_alter() to attach the CSS/JS, no?
e.g.;
Comment #20
micropat commentedVersion 7.x-4.8 turns off caching on AddToAny blocks to resolve this issue.