- 🇩🇪Germany Anybody Porta Westfalica
I agree this makes sense, at least it should not simply use
->getMachineNameSuggestion()
but maybe add ablock_field
prefix or suffix or something like that. Of course that's also no *real* solution, but better than predicting it's something it isn't and risking duplications.How to proceed here?
- Merge request !19Generate a custom id indicating this is from block_field → (Open) created by Anybody
- last update
10 months ago 7 pass - 🇩🇪Germany Anybody Porta Westfalica
@Berdir: Any feedback eventually (if you should have the time)?
- Status changed to Needs work
8 months ago 11:38am 13 August 2024 - 🇨🇭Switzerland berdir Switzerland
A prefix isn't going to help. There's still going to be code that assumes #id is a block config entity and will try to load that.
My suggestion in #2 is a separate property like #block_field_id, then you can find it if you're looking for it, although I personally don't think that is very useful because the machine name *suggestion* is a transliterated and adjusted version of the admin label and nothing that you should rely on in code.
region is a block config entity concept, it does not exist for block_field blocks. but you could say that all block_field blocks are in a in-content pseudo region, then some kind of flag could be useful.
I'm unsure about committing this because it's been 3 years now and even though the project isn't stable, it's still a change.
- 🇩🇪Germany Anybody Porta Westfalica
Thanks @Berdir I added #25 - don't have the time now to look into it deeper, especially what to use for the id attribute, but this should be a first step.
Regarding
although I personally don't think that is very useful because the machine name *suggestion* is a transliterated and adjusted version of the admin label and nothing that you should rely on in code.
That's right, but in that case we needed a way to determine the right one and that was the only specific option here. Good enough for that project in other words. No general solution of course.
How should we proceed?