Partially the result of #2653446: Undefined variable after deleting content type, hook_metatag_config_delete() is passed a string but currently expects an object.
/**
* Implements hook_metatag_config_delete() on behalf of i18n_string.
*/
function i18n_string_metatag_config_delete($config) {
$context = 'metatag_config:' . $config->instance;
metatag_translations_delete($config->config, $context);
}
hook_metatag_config_delete() is expecting a $config object but is passed an $instance string.
/**
* Delete a metatag configuration record.
*/
function metatag_config_delete($instance) {
db_delete('metatag_config')
->condition('instance', $instance)
->execute();
// Allow modules to act upon the record deletion using
// hook_metatag_config_delete().
module_invoke_all('metatag_config_delete', $instance);
// Clear any caches.
metatag_config_cache_clear();
}
The hook is invoked by metatag_config_delete() which passes the $instance string.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | metatag-n2658262-6.patch | 6.96 KB | damienmckenna |
Comments
Comment #2
damienmckenna*goes back to bed*
Comment #3
devin carlson commentedA patch to pass
hook_metatag_config_delete()a$configobject.Comment #4
damienmckennaWould you mind putting together a test for this? Thanks.
Comment #5
damienmckennaClosed a duplicate: #2659314: Error message after deleting content type (i18n)
Comment #6
damienmckennaSomething like this.
Comment #7
damienmckennaThanks Devin! Committed.
Comment #9
damienmckenna