jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Subscription Form Block: block validation errors cause by "Subscribe" / "Follow" text

Open selectedselections opened this issue 5 years ago • 5 comments

Steps to reproduce the issue

  1. Add a Subscription Form block to any post or page
  2. Notice that the block says "Subscribe" by default screenshot
  3. Publish the page and the text changes to "Follow" screenshot
  4. The text cannot be set to "Subscribe" unless you add an extra space, or some modification to the text in the editor screenshot

What I expected

I expected to be able to change the text to anything, or keep the button text as "Subscribe"

What happened instead

If the text in the editor is "Subscribe" it changes to "Follow" by default.

Screenshots Screenshots included above

selectedselections avatar Jan 25 '21 01:01 selectedselections

I've just encountered another instance of this: 27245913-hc

Changing the text outright just did not work, but I added a . after the text the user wants: https://d.pr/i/CVkEQE

After publishing, this is how it appears on the published page: https://d.pr/i/USU65d

For some reason without that . the button text just shows the default "Follow" ("追蹤")

Edit: works with a space too; I added a space after the button text so it's "訂閱 " and that works fine: https://d.pr/i/vS0Nau

sophiegyo avatar Jan 25 '21 07:01 sophiegyo

Related: #18073 and #15474

jeherve avatar Jan 25 '21 09:01 jeherve

Also reported in #18704 and #18706 .

jeherve avatar Feb 04 '21 07:02 jeherve

I can replicate the issue with the "Subscribe" text being treated as the default and overridden on wpcom. However, I haven't encountered any block validation errors related to that text, as alluded to in this issue's title.

The code defaulting the button text to "Follow" has already been removed in https://github.com/Automattic/jetpack/pull/18550. It should be in the next release. Applying its associated diff, D56029-code, to my sandbox fixes the issue for me.

While trying to find validation errors, I did find an issue with this block when Jetpack is run alongside the Gutenberg plugin built from its master branch. In that instance, the validation error that occurs relates to custom font sizes missing in the attributes and therefore generating an invalid shortcode. I'll create a separate issue to track this and investigate that tomorrow.

In the meantime, can anyone confirm whether they experience validation errors due to the button text itself?

If not, I'd suggest closing this issue once https://github.com/Automattic/jetpack/pull/18550 & D56029-code land.

aaronrobertshaw avatar Feb 17 '21 12:02 aaronrobertshaw

Both the subscribe button text issue and validation errors from custom font sizes have been resolved. Closing this issue.

aaronrobertshaw avatar Apr 12 '21 23:04 aaronrobertshaw