Viewing 13 replies - 1 through 13 (of 13 total)
  • That’s odd. Can you try deactivating and reactivating the plugin?

    If that doesn’t work, can you try updating the is_valid_template function in includes/class-amp-post-template.php to return true; and see if that fixes it?

    Thread Starter vincepettit

    (@vincepettit)

    That hasn’t made a difference, still getting blank pages but no PHP errors.

    Thread Starter vincepettit

    (@vincepettit)

    I’ve also tried disabling all plugins and changing theme and still getting the same result

    Thread Starter vincepettit

    (@vincepettit)

    Not sure if this helps but I changed everything to return true in the function:

    private function is_valid_template( $template ) {
    		$template = $this->normalize_path( $template );
    		$content_dir = $this->normalize_path( WP_CONTENT_DIR );
    		if ( 0 !== strpos( $template, $content_dir ) ) {
    			return true;
    		}
    
    		if ( 0 !== validate_file( $template ) ) {
    			return true;
    		}
    
    		if ( ! file_exists( $template ) ) {
    			return true;
    		}
    
    		return true;
    	}

    and get the following error (starred out full path):

    Warning: include(/***/wp-content/themes/presso/amp/single.php): failed to open stream: No such file or directory in /***/wp-content/plugins/amp/includes/class-amp-post-template.php on line 235
    
    Warning: include(): Failed opening '/***/wp-content/themes/presso/amp/single.php' for inclusion (include_path='.:/usr/lib/php7.0') in /***/wp-content/plugins/amp/includes/class-amp-post-template.php on line 235

    Even I am facing the same problem with blank AMP pages. How can I get rid of this?

    KC

    (@koushikchere)

    My WordPress version is 4.2.2 which is Compatible for AMP (Version 0.3.1)

    But, after installing the plugin, I’m getting blank AMP page, even I’ve also tried to check view source code of the AMP page, but it’s also blank.

    Is there any way to fix it, by editing the plugin’s .php files.

    I appreciate your help.

    Thanks,

    Note, if you read through the threads, the main causes for blank pages so far seems to be

    a) running on Windows server
    b) using cloudflare with certain setting
    c) one setting in Yoast SEO may conflict
    d) renaming the wp-content directory (the issue we have over here).

    If any of those apply to you, then you may need to wait for next update.

    KC

    (@koushikchere)

    Thank You, neotrope

    Yes, the website is running on Windows server, that’s the reason, I think.
    Because, I launched AMP pages with the plugin(same version) on few other sites(same WordPress version), successfully.

    And also, I did contact with WP Rocket support, and what they said is-

    we’re only making WP Rocket compatible with the AMP plugin from Automattic, if you have an issue with this plugin, it’s better to contact them directly

    So, I’ve to wait for next update. ??

    brodsky

    (@brodsky)

    Hi,

    Was this issue solved?
    I am also using AMP 0.3 and WP Rocket 2.6.16 (latest) and getting blank pages on a fresh install of AMP

    Thanks

    This should be fixed in 0.3.2

    Thread Starter vincepettit

    (@vincepettit)

    Unfortunately I’m still getting blank pages, not sure why this is, like I say the 0.2 plugin worked fine but for some reason the later ones don’t and I can’t seem to find anything pointing to why as don’t seem to be getting any error messages

    Thread Starter vincepettit

    (@vincepettit)

    I’ve worked out what it was… I had added a filter to use a custom template in to my functions.php and must have deleted the custom template when I was trying to get the plugin to work but not the filter! Just taken the coding out of function.php and all is working correctly now!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Blank pages since updating from 0.2’ is closed to new replies.