• Resolved mayuxi

    (@mayuxi)


    Hi @vmarko and W3TC creators, thanks for the great plugin!
    What if my AMP plugin works in the “Standard template mode”

    In Standard Mode your site uses a single theme and there is a single version of your content. You can opt out from AMP selectively for parts of your site. Every canonical URL will be either AMP or non-AMP. Learn more.

    So there is no “tag based (/my-page/amp/) or query string based (/my-page?amp)” URL, it’s only one URL.
    How should I configure the w3tc amp extension then? With an empty “postfix”?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @mayuxi

    Thank you for reaching out.
    In this case, the AMP extension may not be needed. Can you please share if you are experiencing any issues with modification on your AMP pages?
    Thanks!

    Thread Starter mayuxi

    (@mayuxi)

    Hi @vmarko

    Thanks for your response, here is what happened:

    1. When I installed and configured W3TC with AMP-activated WordPress – most of my images went “missing”, instead there were some kind of “data:image xml+svg” lines, broken images.. And the AMP plugin reported there is a incompatibility with w3tc.

    2. So I did some research and found the AMP extension for W3TC – after activating it, all images went back to normal. Page cache, object cahce, DB – everything is working like a charm.

    3. BUT there is still one issue reported by AMP plugin:

    AMP does not allow the use of JS <script> tags unless they are for loading AMP components, which are added automatically by the AMP plugin (…)

    Invalid inline script.
    Source: W3 Total Cache
    Error code: DISALLOWED_TAG
    Invalid markup: <script … >

    Text Content:

    function w3tc_popupadmin_bar(url) {
    				return window.open(url, __SINGLE_QUOTED_STRING__, __SINGLE_QUOTED_STRING__);
    			}

    Error code details:

    {
    	"node_name": "script",
    	"parent_name": "head",
    	"code": "DISALLOWED_TAG",
    	"type": "js_error",
    	"node_attributes": {
    		"type": "text/javascript"
    	},
    	"text": "\n\t\t\tfunction w3tc_popupadmin_bar(url) {\n\t\t\t\treturn window.open(url, __SINGLE_QUOTED_STRING__, __SINGLE_QUOTED_STRING__);\n\t\t\t}\n\t\t",
    	"node_type": "ELEMENT",
    	"sources": [
    		{
    			"type": "core",
    			"name": "wp-includes",
    			"file": "script-loader.php",
    			"line": 2031,
    			"function": "wp_print_head_scripts",
    			"hook": "wp_head",
    			"priority": 9
    		},
    		{
    			"type": "plugin",
    			"name": "w3-total-cache",
    			"file": "Generic_Plugin.php",
    			"line": 648,
    			"function": "W3TC\\Generic_Plugin::popup_script",
    			"hook": "wp_print_scripts",
    			"priority": 10
    		}
    	],
    	"removed": false,
    	"reviewed": true
    }
    Thread Starter mayuxi

    (@mayuxi)

    Looks like these are related issues: https://www.ads-software.com/support/topic/w3tc-not-valid-for-amp/

    So this issue only when the admin bar is on, thus only for admins, is it correct?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @mayuxi

    Thank you for the information.
    Yes, that is correct. This is only showing on backend when the user is logged in and does not impact the performance of your website.
    Thanks!

    Thread Starter mayuxi

    (@mayuxi)

    Thank you @vmarko !
    I see that not only me reporting this problem. I will try to reach AMP-WP support to resolve this false-invalid AMP page reporting issue.

    ***

    Follow up: https://www.ads-software.com/support/topic/amp-issues-when-w3-total-cache-is-on-standard-mode/

    Thread Starter mayuxi

    (@mayuxi)

    Hi @vmarko seems even if it’s only admin-side issue, but because AMP plugin sees those page as invalid AMP, they won’t be served for user-side as well.

    Here is a quick fix provided by WP-AMP team: https://www.ads-software.com/support/topic/amp-issues-when-w3-total-cache-is-on-standard-mode/#post-14847392

    It solved issue for me, but hope you take a look at it and plan for next W3TC update.

    Thanks

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @mayuxi

    The Extension_Amp_Plugin class has private function is_amp_endpoint() { which checks for 3 functions to check that.
    I’ve opened a Github issue for this in our repository.
    Make sure to track the progress of the issue regularly.
    Thank you!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @mayuxi

    Thank you for yoru patience.
    This has been fixed in the current release so please make sure to update the plugin.
    Once again, thank you for your patience and for bringing this to our attention.

    Thread Starter mayuxi

    (@mayuxi)

    Thanks! That’s great news!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @mayuxi

    You are most welcome!

    We would really appreciate it if you could take a minute and post a review?here. This will help us to continue offering a top-notch product to users.
    Thanks!

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