I get this in firebug on the sharethis settings page
I also cannot select which services I want to have enabled.

Comments

socialnicheguru’s picture

Title: Uncaught ReferenceError: stlib_picker is not defined sharethis:700 » Advagg settings cause: "Uncaught ReferenceError: stlib_picker is not defined sharethis:700" error
Status: Active » Closed (fixed)
Issue tags: +advagg, +sharethis

This is caused by advagg when js is enabled even if no other js options are selected on admin/config/development/performance/advagg/mod

If you want to edit sharethis on it's settings page, disable advagg.

There are no issues with the sharethis widget as it appears on other pages.

Do not use any of the settings under "Optimize JavaScript Ordering" message.js will not show up.

mikeytown2’s picture

Project: ShareThis » Advanced CSS/JS Aggregation
Status: Closed (fixed) » Active

Moving this issue into the AdvAgg queue to see if I can special case this.

mikeytown2’s picture

I can repo this by enabling "Deferred JavaScript Execution: Add The defer Tag To All Script Tags"

mikeytown2’s picture

OK so the issue is that sharethis uses inline javascript inside of the content. If you move all scripts to the footer and "Put a wrapper around inline JS if it was added in the content section incorrectly" is not checked OR "Deferred JavaScript Execution: Add The defer Tag To All Script Tags" is checked then this can happen. I'll look into adding a try catch block to try it again 1 second later, for a total of like 5 times.

Note that "Deferred JavaScript Execution: Add The defer Tag To All Script Tags" will only cause intermittent issues IF "Put a wrapper around inline JS if it was added in the content section incorrectly" is checked.

  • Commit 412d1f6 on 7.x-2.x by mikeytown2:
    Issue #2274477 by mikeytown2: Put javascript found in the content of the...

  • Commit ccc8e8c on 7.x-2.x by mikeytown2:
    Issue #2274477 by mikeytown2: Put javascript found in the content of the...
mikeytown2’s picture

Status: Active » Fixed
StatusFileSize
new1.47 KB
new771 bytes

These patches have been committed fixing this issue. Be sure that the "Put a wrapper around inline JS if it was added in the content section incorrectly" setting is checked if "Move JS to the footer" is set to "All". I ended up using a try catch block that seems to fix the issue in this case.

  • Commit 1e68e4f on 7.x-2.x by mikeytown2:
    Issue #2274477 by mikeytown2: Put javascript found in the content of the...

  • Commit 67cc925 on 7.x-2.x by mikeytown2:
    Issue #2274477 by mikeytown2: Put javascript found in the content of the...

  • Commit a94b283 on 7.x-2.x by mikeytown2:
    Issue #2274477 by mikeytown2: Auto checking when moving all js to footer...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.