Problem/Motivation
DefaultFacetManagerTest seems to be failing since #3561530: Facets referencing entities checks access, which isn't always sensible or performant: https://git.drupalcode.org/project/facets/-/commits/3.0.x?ref_type=heads
Steps to reproduce
https://git.drupalcode.org/project/facets/-/jobs/8750738
Proposed resolution
This might be caused by https://www.drupal.org/node/3489270.
Tests now have to provide config for the body field if they need it: https://www.drupal.org/node/3223395#s-node-storage-body-field
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork facets-3579256
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
prudloff commentedHum weirdly I can't reproduce the failure when running the test locally.
Comment #3
ericgsmith commented@prudloff I initially thought the same, but then I realised I hadn't pulled in the latest search api changes locally..
Exception is being caught and rethrown here: https://git.drupalcode.org/project/search_api/-/commit/64403c2993dad8954...
Original source of exception seems to be when getFieldHandlerForProperty is called for the body field.
Quick debugging showed that
- facets_search_api_dependency is being installed, which has dependency on search_api_test_db which has a dependency on search_api_test_example_content
- search_api_test_example_content contains the body field in its config
- at the time the exception is thrown, when I inspect
\Drupal::service('entity_field.manager')->getFieldMap()['entity_test_mulrev_changed']I do not see the body field listedMaybe something to do with config ordering?
I remember hitting this in an install profile in https://www.drupal.org/project/search_api/issues/3352150To quote that issue:I have not confirmed that it is the same issue but I'm pretty sure it is relatedEdit - my above instinct / assumption seems wrong, the config of the test index does depend on both the field storage and the field index so I dunno whats happening here https://git.drupalcode.org/project/search_api/-/blob/8.x-1.x/tests/modul...
Comment #5
ericgsmith commentedWhen first looking at it I overlooked this was a kernel test. Updating to make sure the config from search_api_test_example_content is installed too.
*edit* And its green 🎉
Comment #6
ericgsmith commentedComment #7
mkalkbrenner