Problem/Motivation

Using FieldStorageConfigStorage::loadByProperties() with the entity_type and field_name as conditions doesn't return the right result because the ID of the entity is generated incorrectly (the '.' is missing).

Proposed resolution

Add the missing '.' .

Remaining tasks

None.

Comments

julia_schwarz created an issue. See original summary.

juliaschwarz’s picture

StatusFileSize
new780 bytes
juliaschwarz’s picture

Status: Active » Needs review
juliaschwarz’s picture

Issue summary: View changes

Version: 8.3.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

sime’s picture

Issue confirmed, the fix works.

sime’s picture

Version: 8.9.x-dev » 9.2.x-dev
Status: Needs review » Needs work

Replicated in Drupal 9. Should be an easy test to add.

init90’s picture

init90’s picture

Title: FieldStorageConfigStorage::loadByProperties ID is generated incorrectly » FieldStorageConfigStorage::loadByProperties() with passed 'entity_type' as condition doesn't return any result
Assigned: juliaschwarz » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.17 KB
new1.93 KB
init90’s picture

Title: FieldStorageConfigStorage::loadByProperties() with passed 'entity_type' as condition doesn't return any result » FieldStorageConfigStorage::loadByProperties() with passed 'entity_type' and 'field_name' as conditions doesn't return any result
init90’s picture

Issue tags: -Needs tests

Closed #2941161: Field storage config storage incorrectly loads by properties as a duplicate of this one. Please add credits for people who worked on it.

Status: Needs review » Needs work

The last submitted patch, 9: 2917606-9.patch, failed testing. View results

init90’s picture

Status: Needs work » Needs review

Seems like a random test fail.

amateescu’s picture

Status: Needs review » Reviewed & tested by the community

Bringing in issue credits from #2941161: Field storage config storage incorrectly loads by properties.

The patch looks great to me, nice work!

  • catch committed 728e4f7 on 9.2.x
    Issue #2917606 by init90, julia_schwarz, thomas.pischke.newscycle,...
catch’s picture

Version: 9.2.x-dev » 9.1.x-dev
Status: Reviewed & tested by the community » Fixed

Looks great.

Committed 728e4f7 and pushed to 9.2.x. Thanks!

  • catch committed 73b2cea on 9.1.x
    Issue #2917606 by init90, julia_schwarz, thomas.pischke.newscycle,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

nsuit’s picture

I think I am seeing the same issue with a different set of conditions.
Drupal 9.4.9, PHP8.1, MySQL db
Using loadByProperties() with 'entity_type' and 'sid' as conditions together, I don't get any results. Sid is the submission id form webforms.
However, I do get results if I use each of the conditions alone.

I think it is a problem with webforms not core.