Description
Description
Legacy widgets are rendered using an <iframe />
with src
set like this:
gutenberg/packages/widgets/src/blocks/legacy-widget/edit/preview.js
Lines 99 to 104 in fea614a
This works when there aren't many parameters or when the server tolerates very long query strings. Unfortunately, when one of these conditions isn't met, we may see an error 414 URI too long like on the screenshot below:
This is easiest to reproduce with a long piece of text, but it also occurs with short inputs when certain plugins are installed. For example, the https://pl.wordpress.org/plugins/widget-visibility-time-scheduler/ adds a number of form fields to every legacy widget's form and triggers errors 414 in certain configurations.
Step-by-step reproduction instructions
- Install and activate the "Classic widgets" plugin
- Add a new text widget
- Paste a few paragraphs of lorem ipsum and save
- Deactivate the classic widgets plugin
- Go to widgets.php
Expected behaviour
A correctly rendered preview
Actual behaviour
Error 414 (if there isn't one, just add a few more paragraphs of text and try again)