Skip to content
Snippets Groups Projects
Commit a6254cc3 authored by neffets's avatar neffets
Browse files

Issue #3128522: Uninstall failed on Iframe 8.x-1.14 (want to upgrade to v2)

parent c33e14ef
No related branches found
No related tags found
No related merge requests found
......@@ -18,12 +18,15 @@ function iframe_install() {
/**
* Implements hook_uninstall().
*/
function iframe_uninstall() {
// Remove the iframe fields.
$fields = EntityStorageInterface::loadByProperties('field_storage_config', ['type' => 'iframe']);
foreach ($fields as $field) {
$field->delete();
}
function iframe_uninstall($is_syncing) {
// Remove all from cache.
\Drupal::cache('data')->deleteAll();
// Remove the iframe fields.
$storage = \Drupal::entityTypeManager()->getStorage('field_storage_config');
$fields = $storage->loadByProperties([
'type' => 'iframe',
]);
$storage->delete($fields);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment