Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
block_content.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Mar 2017 at 13:10 UTC
Updated:
17 May 2025 at 17:37 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersComment #3
hydra commentedThis rly helped me, was a hard one to find.
Comment #4
lauriiiWouldn't this also interfere non-technical users that are only using the UI? Are we sure it is enough to just document this in the class documentation? Of course, this makes it available in api.d.o but it might not be enough for the non-technical users.
Comment #7
borisson_I don't think #4 applies, there is no way that I can see to display a block in another way by just using core.
Comment #8
swentel commented@borisson_ : views, entity reference ? That will render them, but without the block content template.
So yeah, in a way, the best solution is to not allow views or entity reference render them (but not for this patch I guess, and probably over the top). Maybe add it to hook_help as well ?
Comment #9
borisson_Ah, good to know @swentel, I completely forgot about that. Adding it to
hook_helpis a good idea I think.Comment #10
eric_a commentedComment #12
undersound3 commentedComment #15
abhijith s commentedPatch #2 applied cleanly on 9.2.x.
Comment #18
luke.leberThis seems like a very serious issue that affects more than just developers. Doesn't this mean that site builders can walk themselves and their clients out of support guarantees simply by configuring a block content entity reference via the user interface?
Given that this issue has been open for almost 5 years, how many sites might already be affected?
Comment #19
anybodyComment #20
joachim commented> Doesn't this mean that site builders can walk themselves and their clients out of support guarantees simply by configuring a block content entity reference via the user interface?
That's a good point about reference fields pointing to block content entities. Could do with a follow-up?
Patch here looks good.
Comment #23
catchOpened a follow-up #3295183: Should custom blocks be referenceable? to discuss the more general issue. But I don't think it hurts to discourage doing this where we can easily then continue trying to discourage it more. Going to be tricky since existing sites might already be doing something with this.
Committed/pushed to 10.1.x and cherry-picked back through to 9.4.x
Comment #26
dpiJust a small and late nitpick that I think this should have specific block "templates". Instead of potentially being mixed up with block "config", as in #2666578-32: Block Content entities have no Contextual links when rendered outside of Block config entity.