Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
From @legolasbo at #2646216-12: |without Twig filter doesn't remove fields from the entity output:
It would also be nice if the functioning of the |without could be proved with a tests.
Comment | File | Size | Author |
---|---|---|---|
#6 | interdiff-2-6.txt | 6.37 KB | legolasbo |
#6 | add_tests_for-2697093-6.patch | 5.78 KB | legolasbo |
Comments
Comment #2
akalata CreditAttribution: akalata commentedMade some progress with this. So far, the attached patch includes a testing theme for ECK, and testTemplateOverride() checks that this custom theme is enabled and the overriding template is being used when creating an entity.
I haven't quite gotten the adding of fields to the eck entity during the test to work, it tells me the entity type doesn't exist.
Comment #5
akalata CreditAttribution: akalata commentedI've spent a few hours trying to move forward on this and am at my wit's end. Maybe the issue has something to do with the entity type itself being dynamically defined? I get the same error even when specifying the entity type and bundle names, rather than using a randomly-generated string.
First arrow points to "Entity type [random string] has been added."
Second arrow points to "The [random string] entity type does not exist."
It would also explain why this module is missing tests on adding FieldUI fields to ECK entities. :)
Comment #6
legolasboThanks for your work on this akalata. I've just spent a couple of hours moving this forward and we're nearly there. Entity + bundle + fields get created, theme is enabled, but the fields are not showing up. I'm out of time now so just uploading my progress.