You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 23, 2020. It is now read-only.
This will also mark RNG as a dependency for the blocks. On my test site, 20 blocks got removed when I uninstalled the RNG module. To get RNG uninstall cleanly, I had to:
Export configuration, remove RNG dependency from block config, import configuration
Put this in rng.module:
/**
* Implements hook_uninstall().
*/
function rng_uninstall() {
// Remove 'rng_rule_scheduler' and 'rng_current_time' condition from all blocks.
/** @var \Drupal\Core\Entity\EntityStorageInterface $block_storage */
$block_storage = \Drupal::service('entity_type.manager')->getStorage('block');
/** @var \Drupal\block\Entity\Block[] $blocks */
$blocks = $block_storage->loadMultiple();
foreach ($blocks as $block) {
$conditions = $block->getVisibilityConditions();
if ($conditions->has('rng_rule_scheduler')) {
$conditions->removeInstanceId('rng_rule_scheduler');
$block->save();
}
if ($conditions->has('rng_current_time')) {
$conditions->removeInstanceId('rng_current_time');
$block->save();
}
}
}
The text was updated successfully, but these errors were encountered:
I've created a pull request in #195 that just removes all rng conditions from the block UI.
Another way that I've not dug into is maybe forcing a context that doesn't exist in the block UI, or another option to provide a checkbox to enable the condition?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Drupal 8.5, RNG 8.x-1.5
RNGs conditions end up in the configuration of any block created (modified?) when RNG is installed. Example:
This will also mark RNG as a dependency for the blocks. On my test site, 20 blocks got removed when I uninstalled the RNG module. To get RNG uninstall cleanly, I had to:
The text was updated successfully, but these errors were encountered: