SVGs in Nested Blocks Causes 503 Error After Update to 5.8
-
Afternoon!
Been chasing down a crazy error happening on some of my WordPress sites after I upgraded to 5.8 this afternoon. That was 4 hours ago and the pages are still mostly down, but I *think* I know what may be triggering it, but not the root cause.
Some of the pages in these sites, when you attempt to view the page, results in a 503 error “Service Unavailable.” This error also occurs when you attempt to edit the page. Other pages were fine.
I assumed this to be some data corruption, and installed a DB manager plugin so I could poke around. However, the content in the database is fine. I can read/write to it with no issue. As a test, I deleted the html in post_content column and the page came back (without content, obviously).
After removing and re-adding every block in the content (modifying it directly in the database), I discovered that complex SVGs (either created by a plugin or raw in an HTML block) that are nested in another block (column, group, etc.) were causing this.
I sound like I’m crazy, but I’m wondering if Gutenberg/Core added a new
the_content
filter that’s erroring out on larger complex content (such as SVG paths). There were a few FastCGI errors in the logs that may indicate that the server was running out of memory — but they may mean nothing at all.To cover the obvious troubleshooting, the same error appears regardless, if:
All plugins are disabled,
Theme set to 2020
Permalinks Flushed
Sacrificed a stuffed goat to the *nix god.I broke this down into a minimum test case with three variants. Here’s the gist:
https://gist.github.com/aut0poietic/9df32c4383bd8934db59671b77a673ee
post_content-broken.html
— Broken Gutenberg content. Causes a 503 error
Examplepost_content-working-remove-group.html
— Working Gutenberg content, Same code as ‘broken’, without the outer group block.
Examplepost_content_working.html
— Working Gutenberg content, Same code as ‘broken’, line 15 removed.
Example
If I set the
post_content
column of any page/post directly in the database to the contents of the ‘post_content-broken.html’, attempting to view the post/page in the editor or on the front end results in a 503 Service Unavailable error.However, the other two examples both work fine.
That’s what’s leading me to believe that there may be a new filter on
the_content
that’s choking on this content.Or so I speculate. I’m up for any ideas at this point in what’s causing it. All of the sites that are experiencing this issue have complex SVG content in
the_content
.So, um, help?
- This topic was modified 3 years, 4 months ago by .
- This topic was modified 3 years, 4 months ago by . Reason: formatting
- This topic was modified 3 years, 4 months ago by . Reason: missing link
- This topic was modified 3 years, 4 months ago by . Reason: links hate me
The page I need help with: [log in to see the link]
- The topic ‘SVGs in Nested Blocks Causes 503 Error After Update to 5.8’ is closed to new replies.