• TwoThirdsWater

    (@twothirdswater)


    I’m having an almost identical issue to Dr Stout (see:https://wordpress.org/support/topic/javascript-not-being-inserted-into-page). The addthis plugin works fine on my test platform, but not on live.

    Looking at the page source, the addthis css file is being added to the footer, but not the preceding Javascript blocks that I can see on my dev platform.

    There are no JS errors being reported.

    I’m very nervous about attempting Dr Stouts solution however, as the live site is very high traffic and any theme fiddling will cause problems.

    Do you have any idea what might be stopping the addthis JS from being written to the page please?

    Thanks!

    https://wordpress.org/plugins/addthis/

    What is embeded on ‘live’:

    <link rel='stylesheet' id='addthis_output-css'  href='~URL~/wp-content/plugins/addthis/css/output.css?ver=~VID~' type='text/css' media='all' />

    What is embeded on dev

    <script data-cfasync="false" type="text/javascript">
    var addthis_config = {"ui_atversion":300,"data_track_clickback":true,"services_exclude":"print","services_compact":"facebook,reddit,tumblr,flipboard,pinterest_share,linkedin,email,favorites,link","services_expanded":"","ignore_server_config":true};
    var addthis_share = {"passthrough":{"twitter":{"via":"~TWITTER-HANDLE~"}}};
    </script>
                    <!-- AddThis Settings Begin -->
                    <script data-cfasync="false" type="text/javascript">
                        var addthis_product = "wpp-5.1.2";
                        var wp_product_version = "wpp-5.1.2";
                        var wp_blog_version = "4.3.1";
                        var addthis_plugin_info = {"info_status":"enabled","cms_name":"WordPress","cms_version":"4.3.1","plugin_name":"AddThis Sharing Buttons","plugin_version":"5.1.2","anonymous_profile_id":"~ID~","select_prefs":{"addthis_per_post_enabled":true,"addthis_above_enabled":true,"addthis_below_enabled":true,"addthis_sidebar_enabled":true,"addthis_above_showon_home":true,"addthis_above_showon_posts":true,"addthis_above_showon_pages":true,"addthis_above_showon_archives":true,"addthis_above_showon_categories":true,"addthis_above_showon_excerpts":false,"addthis_below_showon_home":false,"addthis_below_showon_posts":true,"addthis_below_showon_pages":false,"addthis_below_showon_archives":true,"addthis_below_showon_categories":false,"addthis_below_showon_excerpts":false,"addthis_sidebar_showon_home":true,"addthis_sidebar_showon_posts":true,"addthis_sidebar_showon_pages":true,"addthis_sidebar_showon_archives":true,"addthis_sidebar_showon_categories":true,"sharing_enabled_on_post_via_metabox":true},"page_info":{"template":"home","post_type":""}};
                        if (typeof(addthis_config) == "undefined") {
                            var addthis_config = {"ui_atversion":300,"data_track_clickback":true,"services_exclude":"print","services_compact":"facebook,reddit,tumblr,flipboard,pinterest_share,linkedin,email,favorites,link","services_expanded":"","ignore_server_config":true};
                        }
                        if (typeof(addthis_share) == "undefined") {
                            var addthis_share = {"passthrough":{"twitter":{"via":"~TWITTER-HANDLE~"}}};
                        }
                        if (typeof(addthis_layers) == "undefined") {
                            var addthis_layers = {"share":{"theme":"transparent","position":"left","numPreferredServices":5}};
                        }
                    </script>
                    <script
                        data-cfasync="false"
                        type="text/javascript"
                        src="//s7.addthis.com/js/300/addthis_widget.js#pubid=~ID~"
                        async="async"
                    >
                    </script>
                    <script data-cfasync="false" type="text/javascript">
                        (function() {
                            var at_interval = setInterval(function () {
                                if(window.addthis) {
                                    clearInterval(at_interval);
                                    addthis.layers(addthis_layers);
                                }
                            },1000)
                        }());
                    </script>
                    <link rel='stylesheet' id='addthis_output-css'  href='~URL~/wp-content/plugins/addthis/css/output.css?ver=4.3.1' type='text/css' media='all' />

The topic ‘Javascript not being written to the page since update’ is closed to new replies.