This ID: block_replacement is already in use by another block

Created on 23 March 2023, about 2 years ago
Updated 26 April 2023, almost 2 years ago

Can't remove ID from multiple blocks

Create two blocks (Structure > Block Layout). Configure and assign ID my_new_block_id to one block. Try to assign ID my_new_block_id to another block. This results in an error message.

I have doubts that a duplicate ID should be an error in any case. Yes, duplicate IDs on a single web page are not ideal and usually unintended. But the block visibility settings do not necessarily allow two blocks with the same HTML ID to be shown on the same page. For example, a site may have one version of a block shown on the home page, and a slightly different version shown on every other page. Those blocks should be allowed to have the same ID, if it makes sense to the developer. I would prefer to be allowed to set duplicate IDs, with a warning.

Thanks for a very useful module that I use on every site!

πŸ“Œ Task
Status

Active

Version

2.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States rjw

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024