Commit 7c3071b7 authored by jhodgdon's avatar jhodgdon

Issue #2318755 by LinL, Devin Carlson, effulgentsia, catch: Block Module: Fix...

Issue #2318755 by LinL, Devin Carlson, effulgentsia, catch: Block Module: Fix documentation that refers to enabling/disabling of modules
parent 4e902066
......@@ -34,7 +34,7 @@ function block_help($route_name, RouteMatchInterface $route_match) {
$output .= '<dt>' . t('Controlling visibility') . '</dt>';
$output .= '<dd>' . t('You can control the visibility of a block by restricting it to specific pages, content types, and/or roles by setting the appropriate options under <em>Visibility settings</em> of the block configuration.') . '</dd>';
$output .= '<dt>' . t('Adding custom blocks') . '</dt>';
$output .= '<dd>' . t('You can add custom blocks, if the the <em>Custom Block</em> module is enabled on the <a href="!extend">Extend page</a>. For more information, see the <a href="!blockcontent-help">Custom Block help page</a>.', array('!extend' => \Drupal::url('system.modules_list'), '!blockcontent-help' => \Drupal::url('help.page', array('name' => 'block_content')))) . '</dd>';
$output .= '<dd>' . t('You can add custom blocks, if the <em>Custom Block</em> module is installed on the <a href="!extend">Extend page</a>. For more information, see the <a href="!blockcontent-help">Custom Block help page</a>.', array('!extend' => \Drupal::url('system.modules_list'), '!blockcontent-help' => \Drupal::url('help.page', array('name' => 'block_content')))) . '</dd>';
$output .= '</dl>';
return $output;
}
......@@ -108,7 +108,7 @@ function _block_rehash($theme = NULL) {
// Disable blocks in invalid regions.
if (!empty($region) && $region != BlockInterface::BLOCK_REGION_NONE && !isset($regions[$region]) && $status) {
drupal_set_message(t('The block %info was assigned to the invalid region %region and has been disabled.', array('%info' => $block_id, '%region' => $region)), 'warning');
// Disabled modules are moved into the BlockInterface::BLOCK_REGION_NONE
// Disabled blocks are moved into the BlockInterface::BLOCK_REGION_NONE
// later so no need to move the block to another region.
$block->disable()->save();
}
......
......@@ -64,8 +64,9 @@ protected function initializePlugin($instance_id) {
}
catch (PluginException $e) {
$module = $this->configuration['provider'];
// Ignore blocks belonging to disabled modules, but re-throw valid
// exceptions when the module is enabled and the plugin is misconfigured.
// Ignore blocks belonging to uninstalled modules, but re-throw valid
// exceptions when the module is installed and the plugin is
// misconfigured.
if (!$module || \Drupal::moduleHandler()->moduleExists($module)) {
throw $e;
}
......
......@@ -17,7 +17,7 @@
class BlockAdminThemeTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -18,7 +18,7 @@
class BlockCacheTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -23,7 +23,7 @@ class BlockHiddenRegionTest extends WebTestBase {
protected $adminUser;
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -18,7 +18,7 @@
class BlockHookOperationTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -17,7 +17,7 @@
class BlockHtmlTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -19,7 +19,7 @@
class BlockInvalidRegionTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -19,7 +19,7 @@
class BlockLanguageCacheTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -24,7 +24,7 @@ class BlockLanguageTest extends WebTestBase {
protected $adminUser;
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -17,7 +17,7 @@
class BlockRenderOrderTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -22,7 +22,7 @@
class BlockStorageUnitTest extends DrupalUnitTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -15,7 +15,7 @@
class BlockSystemBrandingTest extends BlockTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -17,7 +17,7 @@
class BlockTemplateSuggestionsUnitTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -15,7 +15,7 @@
abstract class BlockTestBase extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -17,7 +17,7 @@
class BlockTitleXSSTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -17,7 +17,7 @@
class BlockUiTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -23,7 +23,7 @@
class BlockViewBuilderTest extends DrupalUnitTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -17,7 +17,7 @@
class NewDefaultThemeBlocksTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -17,7 +17,7 @@
class NonDefaultBlockAdminTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
......@@ -32,7 +32,7 @@ class DisplayBlockTest extends ViewTestBase {
protected $strictConfigSchema = TRUE;
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment