New beans aren't added to core's block table until _block_rehash() is called, for example, when hitting the /admin/structure/block page. This is fine when that page is the only mechanism for using bean blocks, but there are other mechanisms (such as the blockreference module) which just use the core block table directly.
Core's block module inserts new custom blocks into the block table in block_add_block_form_submit(). I suggest that on creating a bean, the block for that bean should also be inserted in the same way into the block table. (Updates/deletes to the block table may also need to be done on updating/deleting beans.)
There is a case to say that those 'other mechanisms' for using blocks should be rehashing the block table themselves, but I agree with the thought posted at the end of this blockreference issue that this should be done at the point of block creation, rather than every time that they need to be used/referenced: #1801016-8: New blocks (eg Nodeblocks) don't show up in the blocks list until they're rehashed by an admin
Comments
Comment #1
indytechcook commentedI'm closing this issue as a duplicate of #1891928: Block reference not picking up bean module blocks as they are both the same root cause and that issue already has a patch. Thanks for logging the issue!