Allow WordPress install messages to bubble up to Playground
A blueprint working before, suddenly threw a playground error. I looked through a few hundred lines of error message in the Error box and a couple messaged in the browser console.
After consulting @adamziel it turned out that the theme to be installed changed the required WordPress version. "Current WordPress version does not meet minimum requirements for Twenty Twenty-Five"
Would it be possible to have these messages bubble up to the Playground error box, too? It would improve the debugging of blueprints, considerably.
You have a great point @bph. The current UI is really bad for discovering the root cause and even if you try to read the error, it's raw logs.
@jarekmorawski have we explored a different UI for this?
I'm thinking of reusing this code from the Playground tester to extract the most important part of an error from logs and surface it to the user.
How would that work? Can you give me a few examples? Is there a finite number of such errors?
When the error modal is displayed, we could show a simplified error message and have the full logs as an option to expand.
Here are some PHP and SQL examples. The message column should be enough.
Here is a semi-related issue https://github.com/WordPress/wordpress-playground/issues/1937. Blueprint errors aren't visible except in logs. To fix this we will need to reintroduce the error screen, but it would also suffer from the same issue as described here.
Instead of a full log it should at least match Invalid blueprint: must be equal to constant at /steps/1/data/resource.