The new rich Text Widget in WordPress 4.8 is stripping out code. Get the skinny on what to do for your site and the changes being made to the Text Widget.
See details and links below the video
Text Widget Bug
The new rich Text Widget is stripping out some HTML code.
That’s wreaking havoc for site owners that have certain types of custom coding.
The bug report was posted 5 days ago, citing the specific code types that are being stripped out.
Stripped code types include:
- empty span tags
- empty a href tags, where a class from the css.style sheet is being called
How to Avoid Issues Now
If you haven’t updated to WordPress 4.8 yet, don’t.
A fix is in the works, more on that in a moment.
If you have updated to WordPress 4.8, don’t open your Text Widgets!
Opening them and/or flipping between the Visual and Text view mode is what strips out the code, even if you don’t Save the changes.
The problem is that the Text Widget opens by default into the Visual view mode, and whoosh, your custom coding may be stripped.
Christina of Christina Creative Design forked the original Text Widget code into a new plugin called Classic Text Widget.
Prior to updating to WP 4.8, you can copy all of the code from your current Text Widgets into this one and your code will remain intact.
The caveat with using this plugin is, it’s a painfully slow, manual process for a temporary fix.
You might just want to wait for an update to WordPress, which is already happening.
The bug report has a lengthy discussion with all manner of ideas for how the WP devs should fix this.
Fix ideas include:
- Putting the Text Widget back to standard and creating a new Rich Text Widget
- Creating a new HTML Widget
- Renaming the original Text Widget as HTML Widget and leaving the rich Text Widget in its current state
The discussion includes:
- a push to fix this in the least destructive and time-consuming manner for site owners.
- a way to guarantee the preservation of code currently in the Text Widget, whether site owners have updated or not
Keep in mind that all of the new widgets in WP 4.8 required a ground up rebuild.
There were bound to be issues.
Unfortunately, not enough of the folks who have time to enter into the bug report discussion had time to test the two release candidates before WP 4.8 was released publicly, so here we are.
I did test the release candidates, but I always have well formatted code in my widgets, or don’t use the other types of code that is getting stripped out.
Update in the Works
An update to WP 4.8 is in the works already.
We just don’t know which of the above suggested fixes they are going to take.
I assume it will be a balance of how much code has to change, and how much that will affect future feature updates in WordPress, balanced with how much trouble this is going to be for end users to make the switch.
Stay Up to Date
Be sure to catch me live, or see my video updates for BlogAid Today on
Turn on notifications to know when I go live!!
Subscribe to BlogAid News and my blog posts to get breaking news, events, and Tips Tuesday posts.