Adthis Code Firefox Issues — this archived support thread from the APG vNext community covers a reported issue and its resolution.
Troubleshooting This Issue
- Set
customErrors mode="Off"inweb.configto expose the full error and stack trace. - Check Windows Event Viewer → Application log for ASP.NET exceptions.
- Review Admin Panel → Logs → Error Log for timestamped application errors.
- Restart the IIS Application Pool to clear stale state.
- Verify the database connection string and run any pending upgrade SQL scripts.
Related Resources
AddThis Share Button — Firefox Compatibility Issues in APG vNext
AddThis social sharing buttons occasionally cause JavaScript console errors, layout shifts, or outright failures specifically in Firefox, while working correctly in Chrome and Edge. This thread documents the known causes of AddThis-Firefox incompatibility in APG vNext deployments and the fixes that resolve them.
Common Symptoms
- Share buttons render but clicking them opens a blank popup or does nothing
- Firefox console shows
Cross-Origin Request Blockederrors from addthis.com CDN - Share button widget causes page to jump/shift on load in Firefox (layout shift)
- Firefox's Enhanced Tracking Protection (ETP) blocks the AddThis script entirely
Root Cause: Firefox Enhanced Tracking Protection
AddThis is classified as a social media tracker by Firefox's Enhanced Tracking Protection. In "Standard" ETP mode, the AddThis script is allowed but some cross-origin cookie writes are blocked. In "Strict" mode, the script itself is blocked. This is not a bug — it is Firefox enforcing privacy controls.
Fixes and Alternatives
Fix 1 — Self-Host the Share Button Script
By serving the AddThis JavaScript from your own domain, you bypass Firefox's third-party tracker classification:
<!-- Download and serve locally instead of using CDN -->
<script src="/assets/js/addthis-widget.js#pubid=ra-XXXXXXXX"></script>
Download the widget script monthly — AddThis updates it regularly and the cached version may become outdated.
Fix 2 — Replace AddThis with Native Share API
The Web Share API is supported in Firefox 71+ and removes the dependency on third-party scripts entirely:
document.querySelector('.share-btn').addEventListener('click', async () => {
if (navigator.share) {
await navigator.share({
title: document.title,
url: window.location.href
});
} else {
// Fallback: copy URL to clipboard
await navigator.clipboard.writeText(window.location.href);
alert('Link copied!');
}
});
This approach has zero tracking implications, requires no CDN, and works across all modern browsers including Firefox mobile.
Fix 3 — Load AddThis Asynchronously After User Interaction
Instead of loading AddThis on page load (where ETP may block it), inject the script only when the user hovers over or clicks the share area:
document.querySelector('.share-area').addEventListener('mouseenter', () => {
if (!window.addthis) {
const s = document.createElement('script');
s.src = '//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-XXXX';
document.head.appendChild(s);
}
}, { once: true });
Long-Term Strategy: Moving Away from AddThis
AddThis was shut down by Oracle in May 2023, with the CDN remaining operational but without updates or support. Many websites still use the script, but it increasingly triggers browser tracking protections and ad blockers. For new APG vNext deployments, native sharing implementation is strongly recommended over AddThis.
Building Native Share Buttons Without AddThis
Modern social platforms provide direct share URL patterns that can be linked without any JavaScript dependency:
<!-- Twitter/X Share -->
<a href="https://twitter.com/intent/tweet?url={{ENCODED_URL}}&text={{ENCODED_TITLE}}"
target="_blank" rel="noopener">Share on X</a>
<!-- Facebook Share -->
<a href="https://www.facebook.com/sharer/sharer.php?u={{ENCODED_URL}}"
target="_blank" rel="noopener">Share on Facebook</a>
<!-- LinkedIn Share -->
<a href="https://www.linkedin.com/shareArticle?url={{ENCODED_URL}}&title={{ENCODED_TITLE}}"
target="_blank" rel="noopener">Share on LinkedIn</a>
<!-- WhatsApp (mobile-focused) -->
<a href="https://api.whatsapp.com/send?text={{ENCODED_TITLE}}%20{{ENCODED_URL}}"
target="_blank" rel="noopener">Share on WhatsApp</a>
In APG vNext skin templates, replace {{ENCODED_URL}} with the URL-encoded thread permalink and {{ENCODED_TITLE}} with the encoded thread title. These are available as template variables in APG vNext 5.x skin templates.
Implementing in APG vNext Skin
<!-- APG vNext 5.x skin template variables for share URLs -->
<div class="thread-share">
<span>Share: </span>
<a href="https://twitter.com/intent/tweet?url=<%=Server.UrlEncode(Request.Url.ToString())%>"
target="_blank" rel="noopener noreferrer" class="share-btn share-x">X</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=<%=Server.UrlEncode(Request.Url.ToString())%>"
target="_blank" rel="noopener noreferrer" class="share-btn share-fb">Facebook</a>
<a href="https://www.linkedin.com/shareArticle?url=<%=Server.UrlEncode(Request.Url.ToString())%>"
target="_blank" rel="noopener noreferrer" class="share-btn share-li">LinkedIn</a>
</div>
CSS Styling for Native Share Buttons
.thread-share { display: flex; align-items: center; gap: .5rem; margin: .75rem 0; }
.share-btn {
padding: .3rem .8rem;
border-radius: 4px;
font-size: .8rem;
font-weight: 600;
color: #fff;
text-decoration: none;
}
.share-x { background: #000; }
.share-fb { background: #1877f2; }
.share-li { background: #0a66c2; }
.share-btn:hover { opacity: 0.85; }
This implementation has zero external dependencies, doesn't trigger Firefox's Enhanced Tracking Protection, and adds no page weight beyond the CSS.
Diagnosing AddThis Issues with Browser Developer Tools
Use Firefox DevTools to diagnose AddThis failures before applying fixes. The process takes 5 minutes and pinpoints the exact cause:
- Open Firefox, navigate to the affected APG vNext forum thread
- Press F12 to open DevTools, switch to the Network tab
- Reload the page and filter by domain: type
addthisin the filter bar - If no requests appear: Firefox ETP is blocking the script entirely (Fix 3 is needed)
- If requests appear but show as blocked (red status): CORS issue — check the response headers for
Access-Control-Allow-Origin - If requests succeed but share popup doesn't open: JavaScript error — switch to the Console tab and look for errors after clicking the share button
Firefox's Privacy & Security shield icon in the address bar also shows a list of blocked trackers. Click it to temporarily disable ETP for the page and confirm whether ETP is the cause — this is a non-destructive diagnostic step.
Related Resources
Looking for more help? Browse the support forum or check the Knowledge Base.