Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 799 forks source link

Persistant Jetpack Subscription Modal on Posts HTML Code - Atomic Sites Only #39777

Open mxhassani opened 2 weeks ago

mxhassani commented 2 weeks ago

Impacted plugin

Jetpack

Quick summary

Atomic sites only.

There is a modal that shows up when you scroll down a post if this option is enabled: Newsletter > Show subscription pop-up when scrolling a post

That modal isn't included in the HTML code of the posts if the option is deactivated. But, if the site is Atomic, the modal is visible in the HTML code. With its visibility set to hidden and opacity set to 0. Which is not too SEO-friendly, particularly since it includes an H2 tag.

Steps to reproduce

  1. Open any atomic site (even a new one)
  2. Go to a post
  3. Check the HTML code for an element with the class jetpack-subscription-modal

A clear and concise description of what you expected to happen.

The jetpack-subscription-modal should be visible only when Newsletter > Show subscription pop-up when scrolling a post is enabled. It shouldn't be in the HTML code of any post if the option is deactivated.

What actually happened

The modal is in the HTML code of all posts. It's hidden with CSS code.

Impact

Most (> 50%)

Available workarounds?

Yes, difficult to implement

If the above answer is "Yes...", outline the workaround.

A PHP filter could do but I don't have the bandwidth to find the exact one right now.

Platform (Simple and/or Atomic)

Atomic

Logs or notes

8886459-zen

github-actions[bot] commented 2 weeks ago

Support References

This comment is automatically generated. Please do not edit it.