Closed (fixed)
Project:
Drupal core
Version:
10.5.x-dev
Component:
comment.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2024 at 12:00 UTC
Updated:
19 Nov 2025 at 10:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #4
spokjeWith 5000 runs without a failure this one is too random for me, I think you might have hit a fluke there @catch.
Comment #5
mcdruid commentedThis one seems to fail consistently on PostgreSQL as far as I can see; I've reproduced the failure manually with postgres:16 (in ddev).
Comment #6
mcdruid commentededit - I think I got this wrong..
Comment #7
mcdruid commentedComment #8
mcdruid commentedLooks like the test fail that @catch originally flagged up was under PostgreSQL:
Comment #9
mondrakeI think this is critical as it affects consistently tests on PostgreSql
Comment #10
bradjones1Just ran into this as well. https://git.drupalcode.org/issue/drupal-3343634/-/pipelines/320105/test_...
Comment #11
bradjones1This is consistently reproducible locally... in fact it's less random and much more like, totally broken.
The test is set up wrong. Fixed test MR proposed.
Comment #13
bradjones1Comment #14
bradjones1All green on pgsql.
https://git.drupalcode.org/issue/drupal-3479887/-/pipelines/321059/
Comment #16
bradjones1Comment #17
mondrakeLooks good to me.
Comment #19
larowlan@bradjones1 and I discussed this on the weekend, this is the correct fix
Committed to 11.x
Doesn't apply to 11.0.x but I think we should backport this all the way back to 10.3.x
Tagging as 'Patch (to be ported)' as a result
Comment #21
mondrakeI'd be curious to know why this only failed on pgsql given the fix, and not on mysql and sqlite
Comment #22
larowlanThe default target of an entity reference field is the user entity. Comment::bundleFieldDefinitions sets this to the entity type configured on the comment type
In this test it was not being set because the comment type wasn't created
As a result the commented entity was loaded as a user
On MySQL/sqlite it was entity id 1, on pgsql it was 2
This should have been loading an entity test entity, but instead was loading a user
User 1 existed, user 2 did not
Kudos to bradjones1 for working out it was loading the wrong entity type, at the weekend I pointed him towards why on slack
Comment #27
larowlanAdded MRs all the way back to 10.2.x
Comment #28
smustgrave commentedFunny almost all MRs have random failures but none appear to be around this test.
Comment #29
catchMakes sense to backport this all the way back to 10.2.x
Comment #30
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #31
quietone commentedComment #36
quietone commentedComment #37
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #41
alexpottI don't understand why this was not just cherry-picked to 10.x - it cherry picks clean and the tests pass...
Anyhow done that now.
Comment #43
alexpott