I added some additional javascript in the "additional options" field, like localization, prioritization etc.

The javascript parameters also show up in the sourcecode, but they have no effect whatsoever.
Cleared all Drupal and my browser caches several times ran cron and update.php.

Anybody has the same problem?

Comments

micropat’s picture

Status: Active » Closed (fixed)

Could have been a JavaScript conflict, but no other reports of this. If it's still a problem please post again. Thanks!

robpomeroy’s picture

Version: 6.x-2.3 » 6.x-2.4
Category: support » bug
Status: Closed (fixed) » Active

Same issue here. In the error console, Firefox throws "a2a_config is not defined". Looking at the code for the page, I see (having tidied up the code slightly for ease of reading):

<script type="text/javascript">
  a2a_linkname="xxxxx";
  a2a_linkurl="xxxxx";
  a2a_config.color_main = "252821";
</script>
<script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>

It looks to me like the external javascript (which defines a2a_config) should be included before the customisation but for some reason it's coming in afterwards.

robpomeroy’s picture

PS: Adding "var a2a_config=a2a_config||{};" (the first declaration in the external js) at the start of the Additional Options creates a fudged fix of sorts.

Fidelix’s picture

Well, i've got the same problem here.
Subscribing.

Editing... my syntax was wrong. It is working fine.

micropat’s picture

Status: Active » Closed (fixed)

AddToAny recommends this syntax in the documentation: var a2a_config = a2a_config || {};

The next plugin release will include this so you don't have to. FYI old global variables are backwards-compatible with the new API syntax, so no worries if you're using some of the old variables.