-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AMP Auto Ads Compatibility with AMP for WP plugin #971
Comments
@westonruter While this is not related to our AMP plugin, would there be any problem if we simply removed adding |
@felixarntz In Standard/Transitional modes, yes. In Reader mode this is only done for components in the post content. However, this is changing in v1.5, in which the entire Reader mode templates are sent through the post-processor (ampproject/amp-wp#2202). So as of v1.5, filtering |
@felixarntz What is the targeted release date for this. Thanks |
@TB7722 We don't have a clear timeline yet, but this might make it into the next release scheduled for in 3 weeks from now. |
@felixarntz as long as the implementation is the same across all AMP modes, ✅ IB |
Hi is there any workaround about this? |
@ernee While I can't reproduce this validation error I can see the fallback hook is used in the AMP for WP templates to place the Site Kit Auto ads for AMP code. Maybe we can take a look at this later if you're free. The image below shows the code placements on AMP for WP (via Site Kit). @demiromer Can you share your site URL and I can see if I notice anything in relation to those errors? |
Its been over a month @jamesozzie and I have already replaced the plugin |
@jamesozzie as discussed, I no longer get the error as well. I suspect the AMP for WP plugin has added compatibility in version 1.0.7 per their changelog. |
I am unable to reproduce this either. |
If QA can't reproduce this either I think we can safely close it as fixed upstream 👍 |
I'm unable to reproduce this one on my end. Looks to be fixed. Passed QA ✅ |
Closing as it was not reproducible any longer. |
When using the AMP for WP plugin on a site implementing AMP Auto Ads, the following validation error is thrown on AMP pages:
AMP auto ads are not implemented/ displayed.
/amp
endpoint)Screenshots
Additional Context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
amp-auto-ads
component should only be loaded if anamp-auto-ads
tag generated by Site Kit is actually present in the post content.QA Instructions
amp-auto-ads
tag is still displayed in AMP reader mode content, and that there are no AMP validation errors (i.e. theamp-auto-ads
component is also loaded).add_filter( 'the_content', '__return_empty_string', 999 );
, which should make every post render with empty content in the frontend. Go back to AMP reader mode content (where the post content should now as well be empty), and ensure that there are no AMP validation errors (i.e. theamp-auto-ads
component is not loaded).Implementation Brief
AdSense::amp_data_load_auto_ads_component()
:! $this->adsense_tag_printed
, return early.$data['post_amp_content']
(see https://github.com/ampproject/amp-wp/blob/b86ba30087ea2fcac6f9ddec910fc59428e1ef54/includes/templates/class-amp-post-template.php#L348) does not contain<amp-auto-ads
, return early.the_content
) is generated before theamp_post_template_data
filter is run.Changelog entry
The text was updated successfully, but these errors were encountered: