Support » Plugin: AMP » Links and buttons are disabled

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Alain Schlesser

    (@schlessera)

    The most likely reason this happens is because the HTML that is being produced by your shortcodes is being stripped because it is invalid according to AMP validation rules. You can check the validation errors on the validat
    The link on your site is probably https://debestetips.com/wp-admin/edit.php?post_type=amp_validated_url. If that link doesn’t work, you can find the correct link your AMP > Settings screen under the Reader mode option.

    Regardless of that, I’d like to note that the use of the Reader Mode is discouraged, as it is the legacy option and will be slowly phased out over time. The preferred approach is to use Transitional Mode and work on eliminating as many validation errors as possible. Once all validation errors are fixed, you can switch to Standard mode instead, which turns the entire site into valid AMP by default.

    Transitional mode has the main benefit that your site will still look similar to the non-AMP version, instead of having a completely separate design.

    Thanks, Alain. I tried it with the Transitional Mode, but I’ve got following error:

    Transitional mode activated! However, there was an error when checking the AMP validity for your site. cURL error 28: Operation timed out after 15001 milliseconds with 0 bytes received

    It’s not working with the Redis Object cache also and the max_execution_time of my server is long enough.

    Maybe I will ask an AMP specialist to look at it.

    Plugin Author Weston Ruter

    (@westonruter)

    @debestetips You have the AMP specialists right here, including Alain.

    For the timeout issue, I wonder if the AMP plugin is able to perform the loopback request necessary for doing validation. Please go to Site Health in the WP Admin under Tools. Check specifically for the test, “Your site can perform loopback requests”.

    See also https://github.com/ampproject/amp-wp/issues/1371

    You can try temporarily increasing the timeout with code like this:

    add_filter( 'http_request_args', function( $args, $url ) {
    	$query = wp_parse_args( wp_parse_url( $url, PHP_URL_QUERY ) );
    	if ( isset( $query['amp_validate'] ) ) {
    		$args['timeout'] = 60;
    	}
    	return $args;
    }, 10, 2 );

    Hello Weston,

    Thanks. I checked the test “Your site can perform loopback requests”, but it’s not in the list :/ Is this normal?

    I tried it with the code in the functions.php of my theme, but it didn’t solve the problem.

    Regards,
    Sofie

    Plugin Author Weston Ruter

    (@westonruter)

    No, it’s not normal for the loopback request check to be absent. Is it hidden under Passed Tests?

    debestetips

    (@debestetips)

    It’s also not hidden under the passed tests.

    I’ve enables the debug log and I’ve got following errors:

    PHP Deprecated: Function create_function() is deprecated in /home/zeelandvakantiep/public_html/wp-content/themes/ST/framework/class/class_core.php on line 753

    PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; wlt_shop_checkout_widget has a deprecated constructor in /home/zeelandvakantiep/public_html/wp-content/themes/ST/framework/class/defaults_cart.php on line 2680

    PHP Deprecated: idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home/zeelandvakantiep/public_html/wp-content/plugins/amp/includes/class-amp-http.php on line 233

    PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /home/zeelandvakantiep/public_html/wp-includes/functions.php on line 4469

    Plugin Author Weston Ruter

    (@westonruter)

    Thank you for sharing the error log. Very helpful.

    The first two deprecation notices are problems with your theme, but they are unlikely to be the issue here.

    PHP Deprecated: idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home/zeelandvakantiep/public_html/wp-content/plugins/amp/includes/class-amp-http.php on line 233

    This is something has come up recently. Please see also:

    I’m not sure if this is an issue with the AMP plugin or with your configuration.

    This also is not likely to be the cause of the problem.

    PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /home/zeelandvakantiep/public_html/wp-includes/functions.php on line 4469

    @debestetips This appears to be the crux of the problem. I googled for that notice and came up with this answer which may resolve your problem: https://wordpress.org/support/topic/error-ob_end_flush-failed-to-send-buffer-of-zlib-output-compression/#post-9888151

    Please disable zlib output compression and let us know if that fixes the problem.

    debestetips

    (@debestetips)

    Hello,

    It doesn’t solve the problem when I disable the zlib output compression. When I view a page at the website, I can see “Review 27 validation issues”, but when I go to the Error Index or Validated URLs, following message still appears:

    “Failed to fetch URL(s) to validate. This may be due to a request timeout. Please check your server’s PHP error logs; to do this you may need to enable WP_DEBUG_LOG.”

    Nothing changed in the WP_DEBUG_LOG also.

    Regars,
    Sofie

    Plugin Author Weston Ruter

    (@westonruter)

    Sorry, I’m not sure what is going on. I recommend that you try to figure out why the loopback request check is not appearing in Site Health. I assume that check will be failing, so then the question will be how to fix loopback requests. But this will be a question for your hosting environment.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.