diff --git a/composer.json b/composer.json index 789971b2c8fa9695c0839108cf1198801c5a5e90..2302bbd3df3e1947865e9ccbf782e20b7c20a2a9 100644 --- a/composer.json +++ b/composer.json @@ -109,7 +109,7 @@ "drupal/cern-adminimal-subtheme": "~2.1.0", "drupal/cern-base-theme": "~2.6.9", "drupal/cern-cds-media": "~2.1.4", - "drupal/cern-components": "~2.7.13", + "drupal/cern-components": "~2.7.17", "drupal/cern-dev-status": "~2.0.5", "drupal/cern-display-formats": "~1.4.6", "drupal/cern-drupal-welcome-message-block": "~1.1.0", @@ -154,7 +154,7 @@ "drupal/feeds": "~3.0.0@alpha", "drupal/fences": "~2.0.0@rc", "drupal/field_formatter_class": "~1.5.0", - "drupal/field_group": "~3.1.0", + "drupal/field_group": "~3.2.0", "drupal/field_permissions": "~1.1.0", "drupal/filefield_paths": "~1.0.0@beta", "drupal/filelog": "~2.0.2", @@ -198,7 +198,7 @@ "drupal/smart_trim": "~1.3.0", "drupal/sticky": "~2.0.0", "drupal/token": "~1.9.0", - "drupal/twig_tweak": "~2.9.0", + "drupal/twig_tweak": "~3.1.3", "drupal/ui_patterns": "~1.2.0", "drupal/ui_patterns_ds": "~1.2.0", "drupal/ui_patterns_field_group": "~1.2.0", @@ -276,7 +276,9 @@ "DRUPAL-496: TermName views argument_validator is not working as expected": "patches/drupal_views_argument_validator_TermName-2494617-99.patch", "DRUPAL-567: Cannot save translated nodes after upgrading to 8.8 due to invalid path": "patches/3101344-drupal-core-fix-permissions-checking-while-node-translating-64.patch", "DRUPAL-503: Support enclosure field in Views RssFields row plugin": "patches/views-rss-fields-enclosure-2511878-35.patch", - "Fixes UID base filed still having old default value callbacks https://www.drupal.org/project/drupal/issues/3153455": "patches/3153455-104.patch" + "Fixes UID base filed still having old default value callbacks https://www.drupal.org/project/drupal/issues/3153455": "patches/3153455-104.patch", + "Fixes crash if an external URL is specified in page path https://www.drupal.org/project/drupal/issues/2973422": "patches/save_views_external_url-2973422-19.patch", + "Fixes call to a member function getAccountName() on null https://www.drupal.org/project/drupal/issues/3161212": "patches/core-node_add_author_error-3161212-2-9.x.patch" }, "drupal/paragraphs": { "DRUPAL-466: adds the widget that fixes the landing pages issues\n WARNING: there is a new version of this patch upstream for PHP7.2 with some community validation. But since this version still applies cleanly, we wont update it yet.": "patches/experimental-widget-asymetric-translation-2904705-47.patch" diff --git a/composer.lock b/composer.lock index 3d279730a580f1e5678f4532e258bc549c3a8f44..67e1b2318ee7ab57b4931065995d4892b5f8d390 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d3c64f5ed3951300ea9857f8556c5b78", + "content-hash": "476e490ac1438323c38655fc64da73c5", "packages": [ { "name": "asm89/stack-cors", @@ -2459,18 +2459,18 @@ }, { "name": "drupal/cern-components", - "version": "2.7.16", + "version": "2.7.17", "source": { "type": "git", "url": "https://gitlab.cern.ch/web-team/drupal/public/d9/modules/cern-components.git", - "reference": "0b729f96f108744163368d9562f2ff066cfd88c2" + "reference": "0d765aef3b142bb97fbc731025fa04a89ea09b87" }, "require": { "drupal/cern-full-html-format": "^2.0.2", "drupal/components": "^2.4", "drupal/ds": "^3.9", "drupal/field_group": "^3.1", - "drupal/twig_tweak": "^2.8", + "drupal/twig_tweak": "^3.1.3", "drupal/ui_patterns": "^1.2" }, "type": "drupal-custom-module", @@ -2488,7 +2488,7 @@ } ], "description": "Defines a set of re-usable patterns for the CERN Drupal infrastructure", - "time": "2022-01-11T14:15:59+00:00" + "time": "2022-01-11T15:18:43+00:00" }, { "name": "drupal/cern-dev-status", @@ -5172,17 +5172,17 @@ }, { "name": "drupal/field_group", - "version": "3.1.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/field_group.git", - "reference": "8.x-3.1" + "reference": "8.x-3.2" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/field_group-8.x-3.1.zip", - "reference": "8.x-3.1", - "shasum": "8a719eaea594f0ba874172831cb28da93c66b77a" + "url": "https://ftp.drupal.org/files/projects/field_group-8.x-3.2.zip", + "reference": "8.x-3.2", + "shasum": "2020bbfe40f6ba43bc733ae7c8761632572433a0" }, "require": { "drupal/core": "^8.8 || ^9" @@ -5193,8 +5193,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-3.1", - "datestamp": "1591772567", + "version": "8.x-3.2", + "datestamp": "1628513585", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -7737,7 +7737,7 @@ "source": { "type": "git", "url": "https://git.drupalcode.org/project/rules.git", - "reference": "5c23deb5eee0173e5fbb21c80f9547ddb0fc3830" + "reference": "8a63c77a0eafd547c047f754873d158671daa5a1" }, "require": { "drupal/core": "^9 || ^10", @@ -7750,7 +7750,7 @@ }, "drupal": { "version": "8.x-3.x-dev", - "datestamp": "1641238314", + "datestamp": "1641327161", "security-coverage": { "status": "not-covered", "message": "Dev releases are not covered by Drupal security advisories." @@ -8153,21 +8153,24 @@ }, { "name": "drupal/twig_tweak", - "version": "2.9.0", + "version": "3.1.3", "source": { "type": "git", "url": "https://git.drupalcode.org/project/twig_tweak.git", - "reference": "8.x-2.9" + "reference": "3.1.3" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/twig_tweak-8.x-2.9.zip", - "reference": "8.x-2.9", - "shasum": "c45ba1a41e323a432d1ff36d0a72344b88595a39" + "url": "https://ftp.drupal.org/files/projects/twig_tweak-3.1.3.zip", + "reference": "3.1.3", + "shasum": "9f2f6813bf6d40faded73b0fd36e6c669565c7f7" }, "require": { - "drupal/core": "^8.7 || ^9.0", - "twig/twig": "^1.41 || ^2.12" + "drupal/core": "^9.0", + "ext-json": "*", + "php": ">=7.3", + "symfony/polyfill-php80": "^1.17", + "twig/twig": "^2.12" }, "suggest": { "symfony/var-dumper": "Better dump() function for debugging Twig variables" @@ -8175,8 +8178,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-2.9", - "datestamp": "1608093728", + "version": "3.1.3", + "datestamp": "1635338145", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -8185,7 +8188,7 @@ }, "notification-url": "https://packages.drupal.org/8/downloads", "license": [ - "GPL-2.0+" + "GPL-2.0-or-later" ], "authors": [ { @@ -10750,16 +10753,16 @@ }, { "name": "mglaman/phpstan-drupal", - "version": "1.1.7", + "version": "1.1.8", "source": { "type": "git", "url": "https://github.com/mglaman/phpstan-drupal.git", - "reference": "2d7cc0f646d01af0d7f42dbc55c2211eaeed6675" + "reference": "62d99794b9df2a0e56010a79d67ddeffe61b745b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mglaman/phpstan-drupal/zipball/2d7cc0f646d01af0d7f42dbc55c2211eaeed6675", - "reference": "2d7cc0f646d01af0d7f42dbc55c2211eaeed6675", + "url": "https://api.github.com/repos/mglaman/phpstan-drupal/zipball/62d99794b9df2a0e56010a79d67ddeffe61b745b", + "reference": "62d99794b9df2a0e56010a79d67ddeffe61b745b", "shasum": "" }, "require": { @@ -10834,7 +10837,7 @@ "description": "Drupal extension and rules for PHPStan", "support": { "issues": "https://github.com/mglaman/phpstan-drupal/issues", - "source": "https://github.com/mglaman/phpstan-drupal/tree/1.1.7" + "source": "https://github.com/mglaman/phpstan-drupal/tree/1.1.8" }, "funding": [ { @@ -10850,7 +10853,7 @@ "type": "tidelift" } ], - "time": "2022-01-10T13:58:09+00:00" + "time": "2022-01-12T22:51:02+00:00" }, { "name": "nikic/php-parser", @@ -11308,16 +11311,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.3.3", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "151a51f6149855785fbd883e79768c0abc96b75f" + "reference": "72b04d97b5e6e60a081f17c416fef35bd521120b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/151a51f6149855785fbd883e79768c0abc96b75f", - "reference": "151a51f6149855785fbd883e79768c0abc96b75f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/72b04d97b5e6e60a081f17c416fef35bd521120b", + "reference": "72b04d97b5e6e60a081f17c416fef35bd521120b", "shasum": "" }, "require": { @@ -11333,7 +11336,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -11348,7 +11351,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.3.3" + "source": "https://github.com/phpstan/phpstan/tree/1.4.0" }, "funding": [ { @@ -11368,7 +11371,7 @@ "type": "tidelift" } ], - "time": "2022-01-07T09:49:03+00:00" + "time": "2022-01-14T15:58:47+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", diff --git a/patches/core-node_add_author_error-3161212-2-9.x.patch b/patches/core-node_add_author_error-3161212-2-9.x.patch new file mode 100644 index 0000000000000000000000000000000000000000..d5809f2aebd4a9b57194ee127162b3846f481a61 --- /dev/null +++ b/patches/core-node_add_author_error-3161212-2-9.x.patch @@ -0,0 +1,13 @@ +diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php +index a90a5a723f..173a047f21 100644 +--- a/core/modules/node/src/NodeForm.php ++++ b/core/modules/node/src/NodeForm.php +@@ -152,7 +152,7 @@ public function form(array $form, FormStateInterface $form_state) { + $form['meta']['author'] = [ + '#type' => 'item', + '#title' => $this->t('Author'), +- '#markup' => $node->getOwner()->getAccountName(), ++ '#markup' => !$node->isNew() ? $node->getOwner()->getAccountName() : \Drupal::currentUser()->getAccountName(), + '#wrapper_attributes' => ['class' => ['entity-meta__author']], + ]; + diff --git a/patches/save_views_external_url-2973422-19.patch b/patches/save_views_external_url-2973422-19.patch new file mode 100644 index 0000000000000000000000000000000000000000..f0942c3a7b46761433e7f03a0a0d7fbef98e41cd --- /dev/null +++ b/patches/save_views_external_url-2973422-19.patch @@ -0,0 +1,47 @@ +diff --git a/core/modules/views/src/Plugin/views/display/PathPluginBase.php b/core/modules/views/src/Plugin/views/display/PathPluginBase.php +index ab242ff773..445150053d 100644 +--- a/core/modules/views/src/Plugin/views/display/PathPluginBase.php ++++ b/core/modules/views/src/Plugin/views/display/PathPluginBase.php +@@ -507,6 +507,10 @@ protected function validatePath($path) { + $errors[] = $this->t('Invalid path. Valid characters are alphanumerics as well as "-", ".", "_" and "~".'); + } + ++ if (UrlHelper::isExternal($path)) { ++ $errors[] = $this->t("Path component '{$path}' is external. External URL is not accepted as view path."); ++ } ++ + $path_sections = explode('/', $path); + // Symfony routing does not allow to use numeric placeholders. + // @see \Symfony\Component\Routing\RouteCompiler +diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php +index eea496beea..5bcb407881 100644 +--- a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php ++++ b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php +@@ -458,4 +458,27 @@ protected function checkTranslationSetting($expected_node_translatability = FALS + $this->assertNoText($supported_text); + } + ++ /** ++ * Tests view with external page url should throw error. ++ */ ++ public function testViewUrlAsExternal() { ++ $this->drupalGet('admin/structure/views/add'); ++ $this->assertSession()->statusCodeEquals(200); ++ // Create a view that sorts oldest first. ++ $view1 = []; ++ $view1['label'] = $this->randomMachineName(16); ++ $view1['id'] = strtolower($this->randomMachineName(16)); ++ $view1['description'] = $this->randomMachineName(16); ++ $view1['page[create]'] = 1; ++ $view1['page[title]'] = $this->randomMachineName(16); ++ $view1['page[path]'] = 'https://www.' . $this->randomMachineName(16) . '.com'; ++ $this->drupalPostForm('admin/structure/views/add', $view1, 'Save and edit'); ++ $this->assertRaw('Path component ' . "'" . $view1['page[path]'] . "'" . ' is external. External URL is not accepted as view path.'); ++ ++ // Saving view with internal url. ++ $view1['page[path]'] = 'admin/' . $this->randomMachineName(16); ++ $this->drupalPostForm('admin/structure/views/add', $view1, 'Save and edit'); ++ $this->assertRaw(t('The view %view has been saved.', ['%view' => $view1['label']])); ++ } ++ + }