• Akki

    (@luckyankit)


    Hi,

    On one of my website, I updated the plugin from Version 1.2 to Version latest 1.4.1 and the update broke the Post type AMP pages. It didn’t generate any CSS of it but for a custom type, it is still working fine on the same site.

    How do I force regenerate CSS for Post type? The latest version has also removed checkbox of disabling auto sanitizing.

    Post type URL – http://bit.ly/2r4ZDMc

    Custom post type URL – http://bit.ly/2rH9HLj

    If I revert back to older version plugin, Post type starts working fine.

    Also, I saw if I change to Standard mode, it also changes the CSS which shouldn’t happen and doesn’t use the same one which is being used in Transitional mode.

    • This topic was modified 4 years, 4 months ago by Akki.
Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    On the post type URL I’m not seeing the amp-custom stylesheet at all, whereas on the the custom post type URL, I do see it. That’s strange.

    Do you have some optimization plugin that is stripping HTML comments and doing other minification of CSS/JS.

    Please share the plugins you have active.

    Thread Starter Akki

    (@luckyankit)

    I am using Litespeed plugin but not combining or minifying CSS/JS. Yes HTML minification is ON, but now I’ve excluded ?amp URLs from Litespeed optimizations. So, the plugin won’t touch the AMP URLs at all. There aren’t anymore any such plugins which would interfere with AMP in any way. Using Ad-inserter Pro as well but it has not been causing any issue ever. I am not comfortable sharing full plugins list publicly, so will share it over slack.

    Thread Starter Akki

    (@luckyankit)

    Here’s the list of active plugins: https://pastebin.com/2FV10Kf9

    • This reply was modified 4 years, 4 months ago by Akki.
    Plugin Author Weston Ruter

    (@westonruter)

    What happens if you deactivate Litespeed Cache entirely?

    Thread Starter Akki

    (@luckyankit)

    I just deactivated the litespeed plugin.

    Reverted to Reader mode, saved changes.

    Then back to Transitional mode, it took some time to save changes with once server timeout which used to happen in past too.

    It’s still same, NO CSS for Post type.

    Plugin Author Weston Ruter

    (@westonruter)

    Does the admin bar have any warning icon? If you try to validate the URL does it show an excessive CSS error?

    Thread Starter Akki

    (@luckyankit)

    Yes, there is a warning icon which says to review 95 validation issue but is never able to validate those as the server timeout. But no excessive CSS error.

    Plugin Author Weston Ruter

    (@westonruter)

    95 validation errors is a very high number. This plus the server timeout indicate your theme and/or plugins are not AMP-compatible.

    Also check your PHP error log. It may be there is a fatal error when attempting to parse the CSS. If a fatal error occurs during CSS parsing this may mask an excessive CSS error. I’ll have to check.

    Thread Starter Akki

    (@luckyankit)

    To force regenerate CSS, I added this code temporarily. If I remove this code, the plugin just save changes without trying to do anything.

    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'] = 1000;
    	}
    	return $args;
    }, 10, 2 );

    Without this, the server doesn’t timeout. And Version 1.2 works perfectly with this same configuration.

    Thread Starter Akki

    (@luckyankit)

    I do get this error in Plugin though without above code when saving changes in the Plugin settings when moving from Reader to Transitional.

    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 out of -1 bytes received

    There’s nothing in PHP error log related to this.

    • This reply was modified 4 years, 4 months ago by Akki.
    Plugin Author Weston Ruter

    (@westonruter)

    That filter code shouldn’t have anything to do with regenerating the CSS. If you want to purge the database of cached CSS then you’d need to delete all transients.

    Thread Starter Akki

    (@luckyankit)

    Should I revert back to older version plugin for now then?

    Plugin Author Weston Ruter

    (@westonruter)

    Have you tried deleting all transients?

    Did you look at the PHP error log?

    I’m confused why 1.2 works but 1.4.x does not.

    Thread Starter Akki

    (@luckyankit)

    Cleared transients. It’s still the same. Custom post works, normal posts doesn’t.

    Plugin Author Weston Ruter

    (@westonruter)

    What theme are you using?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Latest Version Plugin not generating CSS for Post Type’ is closed to new replies.