- last update
over 1 year ago 29,406 pass, 2 fail - last update
over 1 year ago 29,417 pass - 🇪🇸Spain plopesc Valladolid
New patch including tests.
Instead of replicating the scenario in a new FunctionJavascript test, it makes the form validation less restrictive to make the bug visible.
The last submitted patch, 14: 3277238-14-test-only.patch, failed testing. View results →
- Status changed to RTBC
over 1 year ago 4:55pm 6 June 2023 - 🇺🇸United States smustgrave
Confirmed the issue described and the patch #14 solves it.
And the failing test shows the issue is being solved.
- last update
over 1 year ago 29,436 pass - last update
over 1 year ago 29,437 pass - last update
over 1 year ago 29,442 pass - last update
over 1 year ago 29,448 pass - last update
over 1 year ago 29,485 pass, 1 fail The last submitted patch, 14: 3277238-14.patch, failed testing. View results →
- Status changed to Needs review
over 1 year ago 7:27am 7 July 2023 - last update
over 1 year ago 29,802 pass - last update
over 1 year ago 29,802 pass - Status changed to RTBC
over 1 year ago 5:38pm 7 July 2023 - 🇺🇸United States smustgrave
Removing credit for #18
As there was no interdiff
No explanation of change
And reroll removed most of the changes.Failure in #14 seems random. Retesting but going to mark too.
- last update
over 1 year ago 29,802 pass - last update
over 1 year ago 29,807 pass - last update
over 1 year ago 29,812 pass - last update
over 1 year ago 29,815 pass - last update
over 1 year ago 29,815 pass - Open on Drupal.org →Environment: PHP 8.2 & MySQL 8last update
over 1 year ago Waiting for branch to pass - last update
over 1 year ago 29,873 pass - Status changed to Needs work
over 1 year ago 10:18am 24 July 2023 - 🇫🇮Finland lauriii Finland
+++ b/core/modules/taxonomy/tests/modules/taxonomy_test/taxonomy_test.module @@ -45,4 +45,8 @@ function taxonomy_test_form_taxonomy_term_form_alter(&$form, FormStateInterface + $form['name']['widget'][0]['value']['#required'] = FALSE;
I don't think allowing to save an invalid term is best way to test this because it's certainly not a behavior we want to have to support.
- 🇨🇭Switzerland berdir Switzerland
I'm unsure, I agree it's somewhat uncommon, but that's already a fairly common scenario that we do "support", the way it works is that you then generate a node title/term name based on some other fields, for example with https://www.drupal.org/project/auto_entitylabel → . Typically you hide the field then though (and can do that with nodes through the UI) but that's a minor difference. The same would indeed also happen there.
- 🇫🇮Finland lauriii Finland
If the module wanted to ensure that the entity is only saved if it's valid, it should generate the title before saving it. Looks like it's currently done in
hook_entity_insert()
which means it's done after it has been saved. 🤷♂️ - Status changed to Needs review
over 1 year ago 12:00pm 24 July 2023 - last update
over 1 year ago 29,878 pass - last update
over 1 year ago 29,877 pass, 2 fail - 🇫🇮Finland lauriii Finland
Here's a test that uses the steps from the issue summary.
The last submitted patch, 23: 3277238-23-test-only.patch, failed testing. View results →
- Status changed to Needs work
over 1 year ago 1:02pm 24 July 2023 - 🇨🇭Switzerland berdir Switzerland
+++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyImageTest.php @@ -0,0 +1,95 @@ + 'name[0][value]' => $this->randomMachineName(), + 'field_test[0][alt]' => $this->randomMachineName(), + ]; + $this->submitForm($edit, 'Save'); + $terms = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadByProperties(['name' => $edit['name[0][value]']]); + $term = reset($terms); + $this->assertSession()->pageTextContains('Created new term ' . $term->getName() . '.'); + }
loading the term by name to display it's name is a bit unecessary. imho it's sufficient to just check the success message based on $edit directly, we don't need to check that the term really exists?
- Status changed to Needs review
over 1 year ago 1:35pm 24 July 2023 - last update
over 1 year ago 29,878 pass - last update
over 1 year ago 29,878 pass - 🇫🇮Finland lauriii Finland
Now that I'm looking at this again, it looks like
\Drupal\taxonomy\TermInterface::getName
is supposed to always returnstring
but\Drupal\Core\Entity\EntityInterface::label
might returnstring|\Drupal\Core\StringTranslation\TranslatableMarkup|null
. I think the right fix would be for\Drupal\taxonomy\Entity\Term::getName
to return empty string when\Drupal\Core\Entity\ContentEntityBase::label
returnsnull
. - Status changed to RTBC
over 1 year ago 3:05pm 25 July 2023 - 🇺🇸United States smustgrave
Makes sense to me and can see the test-only patch fail in 23.
Ran locally too
Exception : Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated
Drupal\taxonomy\TermForm->buildEntity()() (Line: 152) - last update
over 1 year ago 29,880 pass - last update
over 1 year ago 29,887 pass - last update
over 1 year ago 29,909 pass - last update
over 1 year ago 29,947 pass - last update
over 1 year ago 29,947 pass - last update
over 1 year ago 29,954 pass - last update
over 1 year ago 29,954 pass - last update
over 1 year ago 29,959 pass - last update
over 1 year ago 29,959 pass - last update
over 1 year ago 29,959 pass - last update
over 1 year ago 29,960 pass 17:38 14:06 Running- last update
over 1 year ago 30,050 pass - last update
over 1 year ago 30,057 pass - Status changed to Needs review
over 1 year ago 5:36am 23 August 2023 - last update
over 1 year ago 30,045 pass, 2 fail - 🇳🇿New Zealand quietone
The issue summary is clear and there is a proposed resolution. I read the comments and all questions have been answered. However, I notice that the last comment has changed the solution making the proposed resolution incorrect. And the title isn't quite right any more.
I looked at the patch and noticed a doc block missing, the use statements were not sorted, $module should have an @inheritdoc. I have made a patch for those.
I have updated the proposed resolution and tried for an better title.
The last submitted patch, 29: 3277238-29.patch, failed testing. View results →
- 🇮🇳India bhanu951
Got hit by this issue on 9.5.x . But patch from #29 did not fix it.
Seems Patch from #29 🐛 Fix \Drupal\taxonomy\Entity\Term::getName() to conform to the interface Needs work has random failure, rerunning the tests.
- last update
over 1 year ago 30,059 pass - last update
over 1 year ago 30,059 pass - Status changed to RTBC
over 1 year ago 3:41pm 25 August 2023 - 🇺🇸United States smustgrave
Seems changes in #29 are good/all green
@Bhanu951 can you post the error/steps you're taking to get this issue?
- last update
over 1 year ago 30,061 pass - last update
over 1 year ago 30,061 pass - last update
over 1 year ago 30,101 pass - last update
over 1 year ago 30,136 pass - last update
over 1 year ago 30,136 pass - last update
over 1 year ago 30,136 pass, 1 fail The last submitted patch, 29: 3277238-29.patch, failed testing. View results →
- last update
over 1 year ago 30,137 pass - Status changed to Needs work
over 1 year ago 1:08am 6 September 2023 - @lauriii opened merge request.
- Status changed to RTBC
about 1 year ago 9:31pm 29 October 2023 - last update
about 1 year ago 30,465 pass - last update
about 1 year ago 30,484 pass - last update
about 1 year ago 30,486 pass - last update
about 1 year ago 30,487 pass - last update
about 1 year ago 30,489 pass 2:41 0:27 Running- last update
about 1 year ago 30,517 pass - last update
about 1 year ago 30,529 pass - 🇺🇸United States xjm
@lauriii Please remember to hide patch files from the IS when opening an MR. Thanks!
- 🇺🇸United States xjm
I queued the test-only job. Results:
) Drupal\Tests\block\Kernel\Migrate\d6\MigrateBlockTest::testBlockMigration Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -'Schema errors for block.block.aggregator with the following errors: block.block.aggregator:settings.block_count missing schema, block.block.aggregator:settings.feed missing schema, 0 [settings.block_count] 'block_count' is not a supported key., 1 [settings.feed] 'feed' is not a supported key.' +'Schema errors for block.block.aggregator with the following errors: block.block.aggregator:settings.block_count missing schema, block.block.aggregator:settings.feed missing schema, 0 [settings] 'block_count' is not a supported key., 1 [settings] 'feed' is not a supported key.' /builds/project/drupal/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122 /builds/project/drupal/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php:79 /builds/project/drupal/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php:313 /builds/project/drupal/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 FAILURES! Tests: 1, Assertions: 123, Failures: 1.
- 🇺🇸United States xjm
https://www.drupal.org/pift-ci-job/2723504 → documents the expected test-only result, so the issue with the test-only job is not blocking. I reached out to the DA and committer team about it.
- 🇺🇸United States xjm
I fixed a few nitpicks. Apparently the weird failure from the test-only job might be due to the MR not being rebased, so also fixed that. (Adding credit for @fjgarlin for identifying that issue.)
Meanwhile, saving issue credits.
- 🇺🇸United States xjm
The rebase did yield the correct test-only result:
There was 1 error: 1) Drupal\Tests\taxonomy\Functional\TaxonomyImageTest::testTaxonomyImageUpload Exception: Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated Drupal\taxonomy\TermForm->buildEntity()() (Line: 158) /builds/project/drupal/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php:55
- Status changed to Fixed
about 1 year ago 7:45pm 14 November 2023 - 🇺🇸United States xjm
I could not think of any way that no longer returning an invalid
NULL
from this would be particularly disruptive, so I committed this to 11.x, 10.2.x, and 10.1.x. Thanks! Automatically closed - issue fixed for 2 weeks with no activity.