diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php index 4d1dc27f71..ad205711f4 100644 --- a/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -317,6 +317,7 @@ public function buildForm($form_arg, FormStateInterface &$form_state) { // appropriate information persists to the next page request. // All of the handlers in the pipeline receive $form_state by reference and // can use it to know or update information about the state of the form. + \Drupal::logger('FormBuilder calling processForm'); $response = $this->processForm($form_id, $form, $form_state); // In case the post request exceeds the configured allowed size @@ -588,6 +589,7 @@ public function processForm($form_id, &$form, FormStateInterface &$form_state) { // If there are no errors and the form is not rebuilding, submit the form. if (!$form_state->isRebuilding() && !FormState::hasAnyErrors()) { + \Drupal::logger('file')->notice('FormBuilder calling $this->formSubmitter->doSubmitForm'); $submit_response = $this->formSubmitter->doSubmitForm($form, $form_state); // If this form was cached, delete it from the cache after submission. if ($form_state->isCached()) { diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index 6f9ab71cc2..f78f551a21 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -570,9 +570,11 @@ 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', $context); $result = $callable(); // @todo Convert to an assertion in https://www.drupal.org/node/2408013 if ($context->count() > 1) { + \Drupal::logger('file')->notice('Bubbling failed. $context->count() > 1', $context); throw new \LogicException('Bubbling failed.'); } diff --git a/core/modules/media_library/src/Form/FileUploadForm.php b/core/modules/media_library/src/Form/FileUploadForm.php index b8e68cb767..64a19d4e24 100644 --- a/core/modules/media_library/src/Form/FileUploadForm.php +++ b/core/modules/media_library/src/Form/FileUploadForm.php @@ -253,7 +253,7 @@ public function processUploadElement(array $element, FormStateInterface $form_st * The form state. */ public function uploadButtonSubmit(array $form, FormStateInterface $form_state) { - \Drupal::logger('file')->notice('FileUploadForm::uploadButtonSubmit upload values:' . serialize($form_state->getValue('upload', []))); + \Drupal::logger('file')->notice('FileUploadForm::uploadButtonSubmit upload values:' . json_encode($form_state->getValue('upload', []))); $files = $this->entityTypeManager ->getStorage('file') ->loadMultiple($form_state->getValue('upload', [])); diff --git a/core/modules/media_library/src/MediaLibraryUiBuilder.php b/core/modules/media_library/src/MediaLibraryUiBuilder.php index 6ba912b922..5024de3d00 100644 --- a/core/modules/media_library/src/MediaLibraryUiBuilder.php +++ b/core/modules/media_library/src/MediaLibraryUiBuilder.php @@ -119,6 +119,7 @@ public function buildUi(MediaLibraryState $state = NULL) { // to load the changed library content. This is not only more efficient, but // also provides a more accessible user experience for screen readers. if ($state->get('media_library_content') === '1') { + \Drupal::logger('file')->notice('$state->get(\'media_library_content\') === \'1\' line 121'); return $this->buildLibraryContent($state); } else { @@ -293,7 +294,7 @@ protected function buildMediaTypeAddForm(MediaLibraryState $state) { $selected_type_id = $state->getSelectedTypeId(); if (!$this->entityTypeManager->getAccessControlHandler('media')->createAccess($selected_type_id)) { - \Drupal::logger('file')->notice("Unable to create access"); + \Drupal::logger('file')->notice("No create access, exiting buildMediaTypeAddForm()"); return []; } diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/UploadFail.php b/core/modules/media_library/tests/src/FunctionalJavascript/UploadFail.php index 366e83146c..a1abd69207 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/UploadFail.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/UploadFail.php @@ -5,6 +5,7 @@ use Behat\Mink\Exception\ElementNotFoundException; use Drupal\Core\File\Exception\FileNotExistsException; use Drupal\Core\File\FileSystemInterface; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\media\Entity\Media; use Drupal\Tests\TestFileCreationTrait; @@ -91,7 +92,7 @@ public function testManyConsecutiveUploads() { ->fetchAll(); $output = "The file_managed table not updated on iteration $count."; foreach ($logs as $log) { - $output .= "\n" . $log->message; + $output .= "\n" . new TranslatableMarkup($log->message, unserialize($log->variables)); } throw new AssertionFailedError($output); } @@ -111,6 +112,9 @@ public function testManyConsecutiveUploads() { $this->assertElementExistsAfterWait('css', '[name="field_twin_media-0-media-library-remove-button"]', 10000, "Media remove button not found on iteration $count")->click(); $this->waitForText('2 media items remaining', 10000, "'2 media items remaining' not found on iteration $count"); $count++; + if ($count === 40) { + $this->container->get('database')->truncate('watchdog')->execute(); + } usleep(10000); }