Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @mayuxi

    Thank you for the support topic, Yes we are seeing the same warning,

    It’s got added by the W3 Total cache plugin when the admin bar is active, even using their AMP extension doesn’t remove it, although the AMP plugin is blocking the script to create a valid AMP page and recording a validation error.

    This can be only be fixed if the W3 Total cache plugin is slightly modified with a conditional check for AMP.

    wp-content/plugin/w3-total-cache/Generic_Plugin.php line no 648

    instead of

    function popup_script() {
    ?>
    		<script type="text/javascript">
    			function w3tc_popupadmin_bar(url) {
    				return window.open(url, '', 'width=800,height=600,status=no,toolbar=no,menubar=no,scrollbars=yes');
    			}
    		</script>
    			<?php
    }

    use

    function popup_script() {
    		if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
    			return;
    		}
    ?>
    		<script type="text/javascript">
    			function w3tc_popupadmin_bar(url) {
    				return window.open(url, '', 'width=800,height=600,status=no,toolbar=no,menubar=no,scrollbars=yes');
    			}
    		</script>
    			<?php
    }

    Hope this helps!

    Thread Starter mayuxi

    (@mayuxi)

    Thanks for the quick fix. I will let w3tc guys know about it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘AMP issues when W3 Total Cache is on (Standard mode)’ is closed to new replies.