Are there any validation errors showing up when you click “Validate” under the AMP admin bar item? It may be due to having excessive CSS?
Hey @westonruter,
I’m following up on the same site which my colleague reported.
It’s some kind of inconsistency:
Viewing the AMP page, https://www.codeinwp.com/blog/?amp, I see the CSS usage at 1% -> https://share.getcloudapp.com/L1upGm57 but when reviewing the validation details for that page, I see Total CSS size after minification: 41,922 B
-> https://share.getcloudapp.com/8Lu7G8wN
Any idea what could be causing this discrepancy?
We are not using Object Cache, the generated CSS is stored in transients.
Please share your Site Health info. Perhaps there is a plugin conflict?
Hi,
I’ve attached the health info
https://gist.github.com/selul/7659e846243552f4b4f58089f878d860
We haven’t been able to isolate any conflict!
Except for transients, is there any other place that could store the CSS generated?
That’s strange. Are there any validation errors being reported for the CSS? You shared a screenshot of the stylesheet summary, but what about the table above?
I bet you have a CSS rule that contains i-amphtml-
somewhere.
Actually, if that were the case then I’d expect the style[amp-custom]
element to be removed entirely. See https://github.com/ampproject/amp-wp/issues/771
For some reason it seems the stylesheets loaded via in link
elements are getting dropped, but I don’t know why would be.
Examining any validation errors that are being reported above the stylesheets metabox is the next place to look.
Hi @westonruter,
All the validation errors reported by AMP on that page are JS related which has the markup status Removed
, nothing related to the CSS.
Any idea what could prevent the fetching of the external CSS files?
Hi @westonruter,
I’m following up on this issue, it seems it was a CDN compatibility issue.
Right now everything is ok.
Please share the details about what the CDN compatibility issue was so that others in the future can benefit.
Hi @westonruter,
I wish I could but I’m not sure what was causing this and the hosting company that we use doesn’t offer too many details around this. Basically this is their answer:
We are aware that there are at times issues with our CDN, and have included a note about when you go to activate it:
Kinsta CDN may not be 100% compatible with multisites and custom setups.
There are often cases (due to a customized setup) where it is necessary to disable/re-enable the CDN cache to fix certain layout issues
Based on your feedback regarding a possible issue with fetching of the external CSS styles, I have reported that would be an issue with the CDN and they have recreated the CDN distribution which magically fixed the problem.
I hope this helps!