Skip to content
Snippets Groups Projects
Verified Commit 25942e9c authored by Dave Long's avatar Dave Long
Browse files

Issue #3377310 by catch, joelpittet, mark_fullmer, smustgrave, TrevorBradley,...

Issue #3377310 by catch, joelpittet, mark_fullmer, smustgrave, TrevorBradley, bkosborne, MWaters, cilefen, capellic: 400 exceptions result from requests for old asset paths which are missing the "theme" query string, possibly from cached pages

(cherry picked from commit 96695551)
parent 5e1bfe3a
No related branches found
No related tags found
6 merge requests!11628Update file MediaLibraryWidget.php,!7564Revert "Issue #3364773 by roshnichordiya, Chris Matthews, thakurnishant_06,...,!5752Issue #3275828 by joachim, quietone, bradjones1, Berdir: document the reason...,!5627Issue #3261805: Field not saved when change of 0 on string start,!5427Issue #3338518: send credentials in ajax if configured in CORS settings.,!3106Issue #3017548: "Filtered HTML" text format does not support manual teaser break (<!--break-->)
Pipeline #50242 passed
Pipeline: drupal

#50256

    Pipeline: drupal

    #50255

      Pipeline: drupal

      #50254

        +1
        ......@@ -88,7 +88,7 @@ public function onClientError(ExceptionEvent $event) {
        'status_code' => $exception->getStatusCode(),
        ];
        $this->logger->get('client error')
        ->log($error['severity_level'], Error::DEFAULT_ERROR_MESSAGE, $error);
        ->warning(Error::DEFAULT_ERROR_MESSAGE, $error);
        }
        /**
        ......
        ......@@ -3,6 +3,7 @@
        namespace Drupal\KernelTests\Core\EventSubscriber;
        use Drupal\Core\DependencyInjection\ContainerBuilder;
        use Drupal\Core\Logger\RfcLogLevel;
        use Drupal\KernelTests\KernelTestBase;
        use Symfony\Component\ErrorHandler\BufferingLogger;
        use Symfony\Component\HttpFoundation\Request;
        ......@@ -47,6 +48,18 @@ public function testExceptionLogging() {
        503 => 'php',
        ];
        $level_map = [
        400 => RfcLogLevel::WARNING,
        401 => RfcLogLevel::WARNING,
        403 => RfcLogLevel::WARNING,
        404 => RfcLogLevel::WARNING,
        405 => RfcLogLevel::WARNING,
        408 => RfcLogLevel::WARNING,
        501 => RfcLogLevel::ERROR,
        502 => RfcLogLevel::ERROR,
        503 => RfcLogLevel::ERROR,
        ];
        // Ensure that noting is logged.
        $this->assertEmpty($this->container->get($this->testLogServiceName)->cleanLogs());
        ......@@ -60,11 +73,12 @@ public function testExceptionLogging() {
        ini_set('error_log', $error_log);
        $expected_channels = array_values($channel_map);
        $expected_levels = array_values($level_map);
        $logs = $this->container->get($this->testLogServiceName)->cleanLogs();
        foreach ($expected_channels as $key => $expected_channel) {
        $log_message = $logs[$key][2]['channel'];
        $this->assertEquals($expected_channel, $log_message);
        $this->assertEquals($expected_channel, $logs[$key][2]['channel']);
        $this->assertEquals($expected_levels[$key], $logs[$key][0]);
        }
        }
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment