diff --cc core/modules/file/file.module index 06e71ae,36904fa..0000000 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module diff --cc core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php index ab0c6a8,db111fe..0000000 --- a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php +++ b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php @@@ -14,7 -14,7 +14,8 @@@ use Drupal\Core\Field\FieldStorageDefin use Drupal\Core\Field\WidgetBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; +use Drupal\file\Element\ManagedFile; + use Drupal\Core\Url; /** * Plugin implementation of the 'file_generic' widget. diff --git a/core/lib/Drupal/Core/Render/Element/RenderElement.php b/core/lib/Drupal/Core/Render/Element/RenderElement.php index ab97106..a621234 100644 --- a/core/lib/Drupal/Core/Render/Element/RenderElement.php +++ b/core/lib/Drupal/Core/Render/Element/RenderElement.php @@ -250,8 +250,8 @@ public static function preRenderAjaxForm($element) { // Change path to URL. $settings['url'] = NULL; - if (isset($settings['url']) && ($url = $settings['url']) && $url instanceof Url) { - $settings['url'] = $url->setOptions($settings['options'])->toString(); + if (isset($settings['url']) && $settings['url'] instanceof Url) { + $settings['url'] = $settings['url']->setOptions($settings['options'])->toString(); } unset($settings['options']); diff --git a/core/lib/Drupal/Core/Routing/NullRouteMatch.php b/core/lib/Drupal/Core/Routing/NullRouteMatch.php index 3cf8b12..d8a1f26 100644 --- a/core/lib/Drupal/Core/Routing/NullRouteMatch.php +++ b/core/lib/Drupal/Core/Routing/NullRouteMatch.php @@ -63,4 +63,5 @@ public function getRawParameters() { public function getUrl() { return Url::fromRoute($this->getRouteName(), $this->getRawParameters()->all()); } + } diff --git a/core/modules/file/src/Element/ManagedFile.php b/core/modules/file/src/Element/ManagedFile.php index 7a9e05f..75bd1a4 100644 --- a/core/modules/file/src/Element/ManagedFile.php +++ b/core/modules/file/src/Element/ManagedFile.php @@ -9,6 +9,7 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element\FormElement; +use Drupal\Core\Url; use Drupal\file\Entity\File; /** @@ -219,7 +220,7 @@ public static function processManagedFile(&$element, FormStateInterface $form_st } // Add the upload progress callback. - $element['upload_button']['#ajax']['progress']['path'] = 'file/progress/' . $upload_progress_key; + $element['upload_button']['#ajax']['progress']['url'] = Url::fromRoute('file.ajax_progress'); } // The file upload field itself. diff --git a/core/modules/update/src/UpdateManager.php b/core/modules/update/src/UpdateManager.php index 0ae3851..0652430 100644 --- a/core/modules/update/src/UpdateManager.php +++ b/core/modules/update/src/UpdateManager.php @@ -149,8 +149,7 @@ public function projectStorage($key) { // On certain paths, we should clear the data and recompute the projects for // update status of the site to avoid presenting stale information. $route_names = array( - // @todo find out the corresponding route for that. - // case 'admin/appearance/update': + 'update.theme_update', 'system.modules_list', 'system.theme_install', 'update.module_update', diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index 7ede047..73d9185 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -305,7 +305,7 @@ function template_preprocess_views_view_summary(&$variables) { \Drupal::routeMatch()->getUrl()->setOption('alias', TRUE)->toString(), // Could be an alias. \Drupal::url(''), - // Count be an alias. + // Could be an alias. \Drupal::routeMatch()->getUrl()->toString(), ); $active_urls = array_combine($active_urls, $active_urls); diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc index 45183a9..9102f7d 100644 --- a/core/modules/views_ui/admin.inc +++ b/core/modules/views_ui/admin.inc @@ -325,7 +325,7 @@ function views_ui_standard_display_dropdown(&$form, FormStateInterface $form_sta * information about the form. * * @return \Drupal\Core\Url - * The URl object pointing to the form URL. + * The URL object pointing to the form URL. */ function views_ui_build_form_url(FormStateInterface $form_state) { $ajax = !$form_state->get('ajax') ? 'nojs' : 'ajax'; diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php index 69e15a8..7261446 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -757,6 +757,8 @@ public function renderPreview($display_id, $args = array()) { $output .= $preview . drupal_render($table); } + // Ensure that we just remove an additional request we pushed earlier. + // This could happen if $errors was not empty. if ($request_stack->getCurrentRequest() != $current_request) { $request_stack->pop(); } diff --git a/core/tests/Drupal/Tests/Core/Routing/RouteMatchTest.php b/core/tests/Drupal/Tests/Core/Routing/RouteMatchTest.php index e1ff386..b6c2b10 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RouteMatchTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/RouteMatchTest.php @@ -55,7 +55,6 @@ public function testRouteMatchFromRequest() { $this->assertSame(array('foo' => '1'), $route_match->getParameters()->all()); $this->assertSame(array(), $route_match->getRawParameters()->all()); - // A routed request with parameter upcasting. $foo = new \stdClass(); $foo->value = 1;