Repro:
Install Drupal minimal profile.
Install node_example from the Developer Examples module.
Use admin/modules/uninstall or devel/reinstall (Develop Module) to re-install node_example.
Result:
EntityFieldQueryException: Field storage engine not found. in EntityFieldQuery->queryCallback() (line 1172 of C:\something\something\darkside\drupal\includes\entity.inc).
If I add the following code to the minimal.install
// Insert default pre-defined node types into the database. For a complete
// list of available node type attributes, refer to the node type API
$types = array(
array(
'type' => 'page',
'name' => st('Default Page'),
'base' => 'node_content',
'description' => st("Use <em>basic pages</em> for your static content, such as an 'About us' page."),
'custom' => 1,
'modified' => 1,
'locked' => 0,
),
);
foreach ($types as $type) {
$type = node_type_set_defaults($type);
node_type_save($type);
node_add_body_field($type);
}
.. and repeat the same test, there is no error.
Comments
Comment #1
fagoThere is no code of the entity api module involved.
Comment #2
DrMiaow commentedYes. Not in the code I provided.
I suspect that not having a base page defined at the install of drupal seems to trigger something down the line.
The error I am getting is in entity.inc
Comment #3
bgano commentedThe issue appears to originate in field_purge_batch. There are cases where the call to field_info_field_by_id returns an empty result, which is then used to generate an invalid query, which is where the exception occurs. If you check the result of field_info_field_by_id before building/executing the query, the purge works as expected. I haven't tracked down what causes the empty result.
Here's the working code:
Comment #4
bgano commentedIn the interest of completeness, in cases where field_info_field_by_id returns an empty result set, it also gives a warning, because $info['fields'] does not exist. field_info_field_by_ids has the same issue. The following works, but I suspect there might be a deeper issue with _field_info_collate_fields.
Comment #5
bgano commentedIn the interest of completeness, in cases where field_info_field_by_id returns an empty result set, it also gives a warning, because $info['fields'] does not exist. field_info_field_by_ids has the same issue. The following works, but I suspect there might be a deeper issue with _field_info_collate_fields.
Comment #6
star-szrClosed #1540012: EntityFieldQueryException on field_purge_batch on minimal install as a duplicate of this issue.