Module Description
The module provides a Condition plugin for blocks, checking the status code for 40x range of client errors.
Use this to place a block using a Condition plugin to check the HTTP client error status code.
Therefore, one simple use case would be to display a block on a 404 Not Found page or a 403 Forbidden page.
The supported HTTP Client errors page codes are: * 401 * 403 * 404
How to use
Install the module. Go to the Block layout page (/admin/structure/block). Select Place block for the region you would like the block to appear. Select the block you want to appear, from the Place block popup. Under the Visibility conditions, select the vertical tab labelled "HTTP 40x Client error status code". Select the status code you want the block to appear on. This can be combined with the other Visibility conditions, such as Pages or Roles.
Versions
8.x-1.x works for all versions of Drupal 8, but not Drupal 9. 8.x-2.x works with Drupal 8.7.7 and higher, including Drupal 9 and 10. 3.0.x works with Drupal 8.8.3 and higher, including Drupal 9 and 10. I recommend all users to upgrade to this version. You can upgrade from 1.x or 2.x to 3.
Related modules
* Block Visibility Conditions: A module which adds additional block visibility options.
Use this to place a block using a Condition plugin to check the HTTP client error status code.
Therefore, one simple use case would be to display a block on a 404 Not Found page or a 403 Forbidden page.
The supported HTTP Client errors page codes are: * 401 * 403 * 404
How to use
Install the module. Go to the Block layout page (/admin/structure/block). Select Place block for the region you would like the block to appear. Select the block you want to appear, from the Place block popup. Under the Visibility conditions, select the vertical tab labelled "HTTP 40x Client error status code". Select the status code you want the block to appear on. This can be combined with the other Visibility conditions, such as Pages or Roles.
Versions
8.x-1.x works for all versions of Drupal 8, but not Drupal 9. 8.x-2.x works with Drupal 8.7.7 and higher, including Drupal 9 and 10. 3.0.x works with Drupal 8.8.3 and higher, including Drupal 9 and 10. I recommend all users to upgrade to this version. You can upgrade from 1.x or 2.x to 3.
Related modules
* Block Visibility Conditions: A module which adds additional block visibility options.
Module Link
Project Usage
239
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to solve the issue of displaying blocks based on specific HTTP client error status codes, such as 401, 403, and 404, on Drupal websites.
Data Name
http_client_error_status