Closed (fixed)
Project:
AddToAny Share Buttons
Version:
6.x-3.3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jul 2010 at 21:33 UTC
Updated:
5 May 2016 at 23:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
talee23 commentedI would like to add that this is on a page that I have told the addtoany button block not to appear. I don't get this error where the button appears.
da2a is not defined unless there is a button on that page... thus getting the javascript error.
Comment #2
micropat commentedInteresting. The da2a object should be defined right after the first AddToAny button, for example:
Do you see a block of code like the above in your source? Specifically looking for
da2a =Comment #3
talee23 commentedI do see it.. but like i said above, only if i have told the button to appear on that page.
In my configuration of the addtoany block I have told it NOT to appear on my homepage ('') and so I am getting this error only on my homepage.
Comment #4
micropat commentedWe posted at the same time. :) So that makes sense. Will be fixed in the next release.
If anyone wants to provide a patch in the meantime, that would be great.
Comment #5
talee23 commentedGreat thanks!
Comment #6
talee23 commentedTo fix this I changed the code on line 135 in the addtoany.module file to the following:
Comment #7
skizzo commentedfix by talee23 works for me
Comment #8
tadeusz jurek commentedfix by talee23 works for me too :)
Comment #9
Rainman commentedAnother working fix here. Thanks talee23
Comment #10
c4antonio commentednow it's work fine, thanks talee33
Comment #11
gillesbailleuxMany thanks to talee33 for this working fix!
Comment #12
micropat commentedThe attached patch ensures that no extraneous JavaScript is outputted in the first place. Cheers to talee23. ;)
Patch will be applied in version 6.x-3.3.
Comment #13
micropat commentedMy last patch had a bug; use this one.
Comment #14
micropat commentedFixed in 6.x-3.3!
Comment #15
Ela commentedI'm using version 6.x-3.3 , but still have this error
Update: However when applied the fix by talee33, it fixes the problem
Comment #16
zet commentedsame problem with 6.x-3.3
and i don't find the code from talee33 http://drupal.org/node/843068#comment-3155884
Comment #17
micropat commentedFYI the code from talee33 is not recommended (it only stifles the error message), and the original issue was indeed fixed in 6.x-3.3. So I'm changing the issue title to be much more specific. :)
The "da2a is not defined" issue might be related to #884404: dropdown doesn't appear after editing properties (due to ckeditor) or something else. If it's something else, please post a new issue.
Comment #18
whitedroplet commentedI'm getting this da2a javascript error when I enable the addtoany block with no wysiwyg html editor installed.
Comment #19
mattsmith3 commentedI have this error too- and I the dropdown isn't working for me. Version 3.3
Comment #20
aaron commentedhaving the same issue, w/o wysiwyg
Comment #21
aaron commentedseems to be slightly different than this issue though, i'll close and open a new one.
Comment #22
Ela commented... wrong post, sorry
Comment #23
Ela commentedsorry, wrong post
Comment #25
3gteen commentedThanks you
Comment #26
RumpledElf commentedI have the same issue. Trying to put the share buttons on a blog, da2a_1 is the ID but da2a is what the jQuery is looking for so it fails. Been at this for hours, had numerous jQuery things failing to load for various reasons and was hoping cleaning up the jQuery on the site would help a bit since I had some other jQuery based modules failing but no ...
I'm working with the Barg theme from Drupalet which doesn't do a lot of standard Drupal things (including its own jQuery on top of Drupal's was one of the more minor things it does) and the blog TPL file is very long, complex and full of conditionals so I think my only option here is to just not use add to any and try and shoehorn yet another 3rd party non-Drupal library into this website to get share buttons. The same issue happens with the block so I have no idea what is going on.
I'm guessing my problem is the content being rendered so strangely is somehow incrementing the add to any button, although why it happens with both the block and the node versions is beyond me.
Comment #27
RumpledElf commentedFixed my issue in the end by adding https://www.addtoany.com/buttons/for/website these buttons directly into the TPL. Worked first go, no problems.