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.
Steps to reproduce:
- Set up a new Drupal 8 site with the Standard installation profile
- Go to Configuration > Account settings > Manage fields, click Add Field, and create a field of type Text (plain)
- Run
drush audit-content
Drupal\Core\Entity\Query\QueryException: '' not found in core/lib/Drupal/Core/Entity/Query/Sql/Tables.php:316 [error]
Stack trace:
#0 core/lib/Drupal/Core/Entity/Query/Sql/Tables.php(237): Drupal\Core\Entity\Query\Sql\Tables->ensureEntityTable('', '', 'INNER', NULL, 'base_table', 'uid', Array)
#1 core/lib/Drupal/Core/Entity/Query/Sql/Condition.php(44): Drupal\Core\Entity\Query\Sql\Tables->addField('', 'INNER', NULL)
#2 core/lib/Drupal/Core/Entity/Query/Sql/Query.php(155): Drupal\Core\Entity\Query\Sql\Condition->compile(Object(Drupal\Core\Database\Driver\mysql\Select))
#3 core/lib/Drupal/Core/Entity/Query/Sql/Query.php(74): Drupal\Core\Entity\Query\Sql\Query->compile()
#4 site_audit/Check/Content/FieldInstances.php(111): Drupal\Core\Entity\Query\Sql\Query->execute()
#5 site_audit/Check/Abstract.php(254): SiteAuditCheckContentFieldInstances->calculateScore()
Comment | File | Size | Author |
---|---|---|---|
#2 | site_audit-userfieldinstance-2892004.patch | 877 bytes | smokris |
Comments
Comment #2
smokrisThe attached patch enables the check to complete successfully.
Comment #3
hussainwebThe patch worked for me. Also, this error also occurs in 8.x-3.x and considering that that might be the latest development branch, I am shifting the issue there.
Comment #4
hussainwebSorry, this is for 8.x-2.x. I download 3.x which got placed in another directory and I thought it worked. Fixing the version now.
Comment #5
dpagini CreditAttribution: dpagini as a volunteer commentedI ran into this same error and used this patch to resolve it. Worked successfully for me.
Comment #7
socketwench CreditAttribution: socketwench as a volunteer commentedLooks good to me. Committed!