Problem/Motivation
It doesn't make sense not to allow to add none for more than one block
Steps to reproduce
1- Edit a block and add the none as ID
2- Edit a second block and also add none as ID
Proposed resolution
Do not check for duplicated ID if the $id_replacement is equal to none
Issue fork block_class-3356441
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
paulocsComment #4
paulocsComment #5
hmendes commentedThanks
Comment #6
chris matthews commentedComment #9
dydave commentedThank you very much Paulo (@paulocs) for reporting this issue and providing a solution in code, it is greatly appreciated!
Great catch! 👍
Indeed, it doesn't really make sense not to be able to use the value
'<none>'for multiple blocks, to allow users to remove the default block ID on multiple blocks. 🤔After rebasing the MR, I did tests before and after the code changes and was able to confirm they worked as expected:
I was able to save several blocks with the ID value
'<none>'.I checked the display of the blocks and it seemed to work fine as well:
The two blocks would display without any HTML ID.
After updating slightly the inline comment in the merge request, based on the issue summary, I went ahead and merged the changes above at #8. 🥳
I checked in the PHPUNIT tests and currently, the ID field is not tested anywhere....
So that should probably be addressed in a different issue in the future.
For the time being, marking issue as Fixed.
Feel free to let us know if you have any questions or concerns on any of the recent code changes or the project in general, we would be glad to help. 😊
Thanks again very much!