- 🇺🇸United States smustgrave
This one actually appears to still be relevant
- 🇺🇸United States smustgrave
Not really sure what this one was about but since it was a feature request and no follow up going to close out. It can always be re-opened
Thanks!
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
The
justinrainbow/json-schema
version bump didn't work, root cause was #3538439-13: Running tests locally is difficult to match with the CI → . Being fixed at #3540470-16: Support for latest 6.x version of justinrainbow/json-schema package → .Will continue after the weekend.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
LOLOL reading 📌 Allow 6.x version of justinrainbow/json-schema Active points to Composer 2.8.6 vs 2.8.8, while here 2.8.10 is used. https://github.com/composer/composer/releases/tag/2.8.10 points to https://github.com/composer/composer/pull/12376, which is … very much a similar problem 😅 (It touches upon
pattern
being quite brittle, and literally does what we did in 🐛 Img prop constraints require extension to be lower case Active !) - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
The 5.3 regex validation logic is apparently this:
protected function validateRegex($regex) { return false !== @preg_match('/' . $regex . '/u', ''); }
— https://github.com/jsonrainbow/json-schema/blob/5.3.0/src/JsonSchema/Con...
Which indeed fails: https://3v4l.org/hPCA3.
In 6.3.1 and later it is very different: https://github.com/jsonrainbow/json-schema/blob/6.3.1/src/JsonSchema/Con...
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Looks like #7 is turning out to become a reality, but for a different reason 🙃
The problem appears to be that
pattern: ^(/|https?://)?
is not considered valid in 5.3 (which CI is testing with), but is considered valid in 6.4. 🫠 Which I'm developing against locally, and I don't really have a choice, because I'm on a non-ancient version of Composer, which forces this:$ composer require justinrainbow/json-schema:^5.3 justinrainbow/json-schema is currently present in the require-dev key and you ran the command without the --dev flag, which will move it to the require key. Do you want to move this requirement? [no]? yes ./composer.json has been updated Running composer update justinrainbow/json-schema > Drupal\Composer\Composer::ensureComposerVersion Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires justinrainbow/json-schema ^5.3, found justinrainbow/json-schema[5.3.0, 5.x-dev] but these were not loaded, likely because it conflicts with another require. Problem 2 - composer/composer is locked to version 2.8.9 and an update of this package was not requested. - composer/composer 2.8.9 requires justinrainbow/json-schema ^6.3.1 -> found justinrainbow/json-schema[dev-master, 6.3.1, ..., 6.x-dev (alias of dev-master)] but it conflicts with your root composer.json require (^5.3). Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Installation failed, reverting ./composer.json and ./composer.lock to their original content.
- First commit to issue fork.
- 🇦🇺Australia mstrelan
Found this while investigating some phpstan level 2 issues. There are several tests that call
$stream_wrapper_manager->getViaScheme($scheme)->getDirectoryPath()
. The return type for getViaScheme is\Drupal\Core\StreamWrapper\StreamWrapperInterface|bool
. We can satisfy phpstan for most cases with this annotation, but it's far from ideal:* @return ($scheme is 'public' ? \Drupal\Core\StreamWrapper\PublicStream * : $scheme is 'private' ? \Drupal\Core\StreamWrapper\PrivateStream * : $scheme is 'temporary' ? \Drupal\Core\StreamWrapper\TemporaryStream * : $scheme is 'assets' ? \Drupal\Core\StreamWrapper\AssetsStream * : \Drupal\Core\StreamWrapper\StreamWrapperInterface|false)
Alternatively we need to get the stream wrapper first, then assert it's a LocalStream before calling getDirectoryPath.
- @wim-leers opened merge request.
- @wim-leers opened merge request.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
The pivot from
uri-reference
touri
should be uneventful, because as described in https://github.com/json-schema/json-schema/issues/81, URI references are a subset of URLs.But in practice, this does not seem to be the case, due to the utterly broken JSON Schema validation of URIs in
justinrainbow/json-schema
. Hopefully #3540470-14: Support for latest 6.x version of justinrainbow/json-schema package → brings relief.For now, sticking to
uri-reference
to reign in scope. - 🇬🇧United Kingdom catch
I'm sure this hasn't been fixed. It's most likely that it will end up in contrib with history module before it is but we should move it there with that module.
- 🇨🇦Canada jmee Canada
using this as a patch is working well (Drupal 10.5.2, applied patch using composer)
I did run into one issue, using this setting with a paragraph type that included a boolean field. An 'empty' boolean field is still saved to the database as a 0 value.
I'm not sure if it makes sense to include this case in the scope here, since it could be difficult to account for without adding another setting to the UI, and has more to do with how the boolean field type works. There are definitely some site building workarounds, like using a list field instead of a boolean, or simply not setting a default paragraph type in the field widget.
thanks for the work done here!
- 🇺🇸United States smustgrave
Since shortcut is being deprecated from core going to mark this postponed and let maintainers in contrib decide.
- 🇺🇸United States smustgrave
Thank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
- 🇺🇸United States smustgrave
Thank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
- 🇺🇸United States smustgrave
Since there's been no follow up going to close this one out. Also going to mentioned field_layout is marked to be deprecated and will be moving to contrib in Drupal 12.
- 🇺🇸United States smustgrave
This came up as a daily BSI target
This definitely appears to be relevant, from checking a few of the
['#description']
instances in core.This will need an issue summary update but @alexpott would you say this also just needs a reroll?
- achap 🇦🇺
Added a new commit to MR 120 that fixes an issue where if an entity makes use of the "Hide non translatable fields on translation forms" the translatable fields are hidden even when creating a new node via IEF on a translation of the parent entity.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Same is true for video, which is currently limited to just MP4.
- 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺
Failing:
Options Widgets (Drupal\Tests\options\Functional\OptionsWidgets) ✔ Radio buttons ✔ Check boxes ✔ Select list single ✔ Select list required error attribute ✔ Select list multiple ✔ Select list float ✔ Empty value ✘ Options list alter ┐ ├ Behat\Mink\Exception\ElementNotFoundException: Element matching xpath "//select[@id="edit-card-4"]//option[@value="" and text()="- Select something -"]" not found. │ │ /builds/issue/drupal-1585930/vendor/behat/mink/src/WebAssert.php:465 │ /builds/issue/drupal-1585930/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php:691
- 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺
Failed PHPUnit:
Options Widgets (Drupal\Tests\options\Functional\OptionsWidgets) ✔ Radio buttons ✔ Check boxes ✔ Select list single ✘ Select list required error attribute ┐ ├ Behat\Mink\Exception\ElementNotFoundException: Option with id|name|label|value "_none" not found. │ │ /builds/issue/drupal-1585930/core/tests/Drupal/Tests/WebAssert.php:241 │ /builds/issue/drupal-1585930/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php:406 ┴ ✔ Select list multiple ✔ Select list float ✔ Empty value ✘ Options list alter ┐ ├ Behat\Mink\Exception\ElementNotFoundException: Element matching xpath "//select[@id="edit-card-1"]//option[@value="_none" and text()="- None -"]" not found. │ │ /builds/issue/drupal-1585930/vendor/behat/mink/src/WebAssert.php:465 │ /builds/issue/drupal-1585930/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php:689
- @eduardo-morales-alberti opened merge request.
- 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺
We will open a MR to track the changes properly
- 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺
@darktek some changes do not match the 93 patch:
Why do you replaced "$element['#value'] === ''" by "$element['#value'] == ''" or "if ($value !== '') {" by "if ($value != '') {"?
interdiff 1585930-93.patch 1585930-96.patch
diff -u b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php --- b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php @@ -90,7 +90,7 @@ * The form state. */ public static function validateElement(array $element, FormStateInterface $form_state) { - if ($element['#required'] && $element['#value'] === '') { + if ($element['#required'] && $element['#value'] == '') { if (isset($element['#required_error'])) { $form_state->setError($element, $element['#required_error']); } @@ -144,7 +144,7 @@ // Add an empty option if the widget needs one. if ($empty_label = $this->getEmptyLabel()) { - $options = ['' => $empty_label] + $options; + $options = ['_none' => $empty_label] + $options; } $module_handler = \Drupal::moduleHandler(); diff -u b/core/modules/options/tests/src/Functional/OptionsSelectDynamicValuesTest.php b/core/modules/options/tests/src/Functional/OptionsSelectDynamicValuesTest.php --- b/core/modules/options/tests/src/Functional/OptionsSelectDynamicValuesTest.php +++ b/core/modules/options/tests/src/Functional/OptionsSelectDynamicValuesTest.php @@ -36,7 +36,7 @@ $this->assertCount(count($this->test) + 1, $options); foreach ($options as $option) { $value = $option->getValue(); - if ($value !== '') { + if ($value != '') { $this->assertContains($value, $this->test); } } diff -u b/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php b/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php --- b/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php +++ b/core/modules/options/tests/src/Functional/OptionsWidgetsTest.php @@ -613,7 +613,7 @@ // Display form: check that empty '' option is present and has label. $this->drupalGet('entity_test/manage/' . $entity->id() . '/edit'); - $this->assertNotEmpty($this->xpath('//div[@id=:id]//input[@value=:value]', [':id' => 'edit-card-1', ':value' => '']), 'A test radio button has a "None" choice.'); + $this->assertNotEmpty($this->xpath('//div[@id=:id]//input[@value=:value]', [':id' => 'edit-card-1', ':value' => '']), 'A test radio button has a "None" choice.'); // Change it to the select widget. $display_repository->getFormDisplay('entity_test', 'entity_test') diff -u b/core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php b/core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php --- b/core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php +++ b/core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php @@ -52,12 +52,12 @@ * @param string $id * The ID of the workspace to create. * @param string $parent - * (optional) The ID of the parent workspace. Defaults to ''. + * (optional) The ID of the parent workspace. Defaults to '_none'. * * @return \Drupal\workspaces\WorkspaceInterface * The workspace that was just created. */ - protected function createWorkspaceThroughUi($label, $id, $parent = '') { + protected function createWorkspaceThroughUi($label, $id, $parent = '_none') { $this->drupalGet('/admin/config/workflow/workspaces/add'); $this->submitForm([ 'id' => $id, @@ -94,12 +94,12 @@ * @param string|null $id * The ID of the workspace to create. * @param string $parent - * (optional) The ID of the parent workspace. Defaults to '_none'. + * (optional) The ID of the parent workspace. Defaults to ''. * * @return \Drupal\workspaces\WorkspaceInterface * The workspace that was just created. */ - protected function createWorkspaceThroughUi(?string $label = NULL, ?string $id = NULL, string $parent = '_none') { + protected function createWorkspaceThroughUi(?string $label = NULL, ?string $id = NULL, string $parent = '') { $id ??= $this->randomMachineName(); $label ??= $this->randomString();
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇩🇪Germany Anybody Porta Westfalica
Back to NW as of #32 - maybe someone could start a fresh MR based on that?
- 🇳🇿New Zealand danielveza Brisbane, AU
The replicate module has support for cloning a node & it's Layout Builder layout to a new node.
I'm not sure how I feel about allowing the default layout to be created/updated from an overridden nodes layout. It feels risky.
Marking this as postponed to see if anyone has thoughts on if this is something that should be investigated before I close.
- 🇺🇸United States smustgrave
Since there's been no follow up and was tagged as a minor going to close this one out. If still a valid task please re-open.
Thanks all!
- 🇺🇸United States smustgrave
Thank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇺🇸United States dcam
The original proposed changes must be updated because the
arrayPropertyPath
property was deprecated and removed. Here's the change record: https://www.drupal.org/node/3307919 → . - 🇺🇸United States dcam
The patch from #22 was converted to an MR. The changes to
LinkNotExistingInternalConstraintValidatorTest
did not seem to be relevant anymore. No other test changes have been made. - @dcam opened merge request.
- 🇺🇸United States dcam
Added the issue summary template. Added the Needs Tests tag because the existing tests need to be updated to check for those specifically.