diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php index d4de829a26..4a24912345 100644 --- a/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -999,6 +999,7 @@ public function doBuildForm($form_id, &$element, FormStateInterface &$form_state if (isset($element['#process']) && !$element['#processed']) { foreach ($element['#process'] as $callback) { $complete_form = &$form_state->getCompleteForm(); + \Drupal::logger('file')->notice('Calling ' . json_encode($callback)); $element = call_user_func_array($form_state->prepareCallback($callback), [&$element, &$form_state, &$complete_form]); } $element['#processed'] = TRUE; diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index a98c1b14f5..6abbf86861 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -570,7 +570,6 @@ public function executeInRenderContext(RenderContext $context, callable $callabl // Set the provided context and call the callable, it will use that context. $this->setCurrentRenderContext($context); - \Drupal::logger('file')->notice('Renderer calling setCurrentRenderContext'); $result = $callable(); // @todo Convert to an assertion in https://www.drupal.org/node/2408013 if ($context->count() > 1) { diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/UploadFail.php b/core/modules/media_library/tests/src/FunctionalJavascript/UploadFail.php index 8186d8c50d..d7b879d930 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/UploadFail.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/UploadFail.php @@ -67,17 +67,18 @@ public function testManyConsecutiveUploads() { $count = 0; // Upload then remove an image 100x to see if/when it fails. while ($count < 100) { - \Drupal::logger('file')->notice("\n\nStarting iteration $count"); + $this->assertElementExistsAfterWait('css', '.media-library-open-button[name^="field_twin_media"]', 10000, "Twin media open button not found on iteration $count")->click(); $this->assertElementExistsAfterWait('css', '.media-library-menu', 10000, "Media library menu did not appear on iteration $count"); $this->waitForText('Add or select media', 10000, "Text 'Add or select media' not appear on iteration $count"); $this->clickTypeTab('Four'); $new_filename = uniqid(time()) . '.jpg'; - $new_filepath = $file_system->realpath('public://') . '/' . $new_filename; + $new_filepath = $file_system->realpath('temporary://') . '/' . $new_filename; $file_system->copy($file_system->realpath($jpg_image->uri), $new_filepath); $this->waitForFieldExists('Add files', 10000, "Did not find 'Add files' on iteration $count"); $media_count = $database->select('file_managed')->countQuery()->execute()->fetchField(); $this->assertEquals($count, $media_count); + \Drupal::logger('file')->notice("\n\nStarting iteration $count"); $page->attachFileToField('Add files', $new_filepath); $result = $page->waitFor(10, function () use ($database, $count) { $media_count = $database->select('file_managed')->countQuery()->execute()->fetchField(); @@ -150,11 +151,6 @@ protected function waitForNoText($text, $timeout = 10000, $message = 'text still protected function waitForText($text, $timeout = 10000, $message = 'text not found') { $assert_session = $this->assertSession(); $result = $assert_session->waitForText($text, $timeout); - if (empty($result)) { - $this->htmlOutput(); - $filename = $this->htmlOutputDirectory . '/' . $this->htmlOutputClassName . '-' . $this->htmlOutputCounter . '-' . $this->htmlOutputTestId . '-waitForText.jpg'; - $this->createScreenshot($filename); - } $this->assertNotEmpty($result, $message); }