- Issue created by @donquixote
- Assigned to huzooka
- ππΊHungary huzooka Hungary ππΊπͺπΊ
I also need the same feature (option to limit entity print to some specified types). I also discovered that extra fields are added to every single entity type, not just to content entity types.
Changing the category to feature request.
- Merge request !66Issue #3468563: Option to restrict entity print to specified entity types β (Open) created by huzooka
- ππΊHungary huzooka Hungary ππΊπͺπΊ
* Added a new config option to restrict print features to entity types.
* Added a config subscriber which resets entity field caches if config value is changed
* Updated hook implementations
* Added test coverageAsking for review.
- π·π΄Romania claudiu.cristea Arad π·π΄
Now I can limit entity print only to a limited group of entity types. No more unneeded extra fields and a huge Git diff on config export. Code looks good. Apart from manual testing, I see it has solid test coverage.
- ππΊHungary huzooka Hungary ππΊπͺπΊ
We just hit an error with this patch applied, checking what's going on (should be obvious imho):
php.WARNING: Warning: Undefined array key "webform_submission" in entity_print_entity_extra_field_info() (line 63 of <project-root>/web/modules/contrib/entity_print/entity_print.module)
Moving back to NW.
- ππΊHungary huzooka Hungary ππΊπͺπΊ
There they are!
https://git.drupalcode.org/issue/entity_print-3468563/-/jobs/3536971#L127
1 test triggered 2 PHP warnings: 1) /builds/issue/entity_print-3468563/entity_print.module:63 Undefined array key "entity_test_with_bundle" Triggered by: * Drupal\Tests\entity_print\Kernel\ExtraFieldsTest::testBundleableEntityTypeWithoutBundle /builds/issue/entity_print-3468563/tests/src/Kernel/ExtraFieldsTest.php:192 2) /builds/issue/entity_print-3468563/entity_print.module:63 foreach() argument must be of type array|object, null given Triggered by: * Drupal\Tests\entity_print\Kernel\ExtraFieldsTest::testBundleableEntityTypeWithoutBundle /builds/issue/entity_print-3468563/tests/src/Kernel/ExtraFieldsTest.php:192 OK, but there were issues! Tests: 59, Assertions: 544, Warnings: 2.
- ππΊHungary huzooka Hungary ππΊπͺπΊ
I hope we can get back the RTBC status π₯Ή