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.
I tried to add a test for the file resource at the REST module and I saw that the service fails when it is being enabled. The error is the following:
Drupal\Component\Plugin\Exception\PluginException: The plugin (entity:file) did not specify an instance class. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 62 of /home/juampy/projects/drupal8/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).
A patch with the test will be attached in the following comment.
Comment | File | Size | Author |
---|---|---|---|
#4 | drupal-file-resource-test-2128783-1.patch | 1.73 KB | juampynr |
#1 | drupal-file-resource-test-2128783-1.patch | 1.73 KB | juampynr |
Comments
Comment #1
juampynr CreditAttribution: juampynr commentedComment #2
juampynr CreditAttribution: juampynr commentedComment #3
juampynr CreditAttribution: juampynr commentedHere is the patch with the test.
Comment #4
juampynr CreditAttribution: juampynr commentedAttaching again to see if it triggers the testbot.
Comment #5
juampynr CreditAttribution: juampynr commentedComment #7
dawehner@juampy
Are you sure you upload the right file?
Comment #8
moshe weitzman CreditAttribution: moshe weitzman commentedAny chance we can get this going again?
Comment #9
juampynr CreditAttribution: juampynr commentedSure! I will find some time today.
Comment #10
BerdirYou're not enabling the file module, so that doesn't seem very surprising to me?
Comment #11
juampynr CreditAttribution: juampynr commentedThis test fits perfectly to prove #2128791: File resource needs an access controller so I am closing this one as a duplicate since I have added this test part of the patch of that issue.