In general this happens if you add a post transaction callback with anything that starts a transaction. In this particular case it might be the route provider used in kernel tests.
To reproduce this outside tests, add a post transaction callback that saves a node. For example:
function example_node_presave(\Drupal\node\NodeInterface $node) {
$db = \Drupal::database();
if ($db->inTransaction()) {
$db->transactionManager()->addPostTransactionCallback(function ($success) use ($node) {
if ($success) {
if ($node->label() === '#3447097') {
$node->set('title', 'issue 3447097');
$node->save();
}
}
});
}
}
Add or edit node, set title to #3447097
and save.
olli → created an issue.
olli → created an issue.
Reviewed the changes and added questions about code that seems unnecessary.
I was able to reproduce this with simplytest.me:
- launch sandbox and login
- create basic page
- edit and save the page twice without any changes
- go to node/1/revisions/view/2/3/visual_inline
Patch #2 seems to fix it, thank you!
Here's an alternative for 4.x that prints errors only if twig debug mode is enabled.
Re #40
Drupal\Tests\media_library\FunctionalJavascript\WidgetViewsTest
No idea yet, seems to work in manual testing unless I'm missing a step.
If I first click "Apply filters", then select media and click "Insert selected" I see the POST /media-library request URL includes uncompressed ajax_page_state and response code is 500:
Symfony\Component\HttpFoundation\Exception\BadRequestException: Input value "ajax_page_state" contains a non-scalar value. in Symfony\Component\HttpFoundation\InputBag->get() (line 37 of vendor/symfony/http-foundation/InputBag.php)
#0 core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(34): Symfony\Component\HttpFoundation\InputBag->get()
#1 core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#2 core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#3 index.php(19): Drupal\Core\DrupalKernel->handle()
#4 {main}
The other bug I discovered is that Views generates incorrect destination paths when Drupal is in a subdirectory. The fix is on the same method and is covered by the test coverage being added here so probably better to fix it here.
Nice! This has been reported also in 🐛 In subsite setup view_path is not correct for links on AJAX page refresh Closed: duplicate .
Looks like a problem with blocks in umami's pre_header and header regions: umami/templates/layout/page.html.twig
renders those blocks twice ignoring the output of first |render
where dump()
sends the necessary CSS/JS.
#26 seems to remove any closing body and html elements, also intentional ones inside code blocks.
Should we instead try to fix this somehow in Html::load()
that adds them? https://3v4l.org/vm89s
tim.plunkett → credited olli → .
olli → created an issue.