Subscription Form Block: block validation errors cause by "Subscribe" / "Follow" text
Steps to reproduce the issue
- Add a Subscription Form block to any post or page
- Notice that the block says "Subscribe" by default screenshot
- Publish the page and the text changes to "Follow" screenshot
- 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
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
Related: #18073 and #15474
Also reported in #18704 and #18706 .
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.
Both the subscribe button text issue and validation errors from custom font sizes have been resolved. Closing this issue.