- Issue created by @Anybody
- 🇩🇪Germany Anybody Porta Westfalica
Okay, fences returns here for ajax_block blocks:
if (!$block instanceof ThirdPartySettingsInterface) { return; }
in FencesBlock.php, Line 30
The question is, why the block doesn't have the ThirdPartySettingsInterface here.
- 🇩🇪Germany Anybody Porta Westfalica
Okay in our case, for example
$element['#id']
was == "commerce_cart". But the issue seems to be, thatBlock::load($element['#id']);
in FencesBlock.php
tries to load a conflig block, which does not exist, as the configuration resists in the ajax_block!
See https://drupal.stackexchange.com/a/171733 for details.So the block that holds the third party settings is not
commerce_cart
, but the placed ajax_block instance!So this needs a different strategy to pass the attributes from the pseudo ajax_block to the ajax-loaded content block. It can't be fixed directly.
There's already some logic in
block_ajax_block_view_alter()
but as this case shows, it doesn't fully mimic the contained block and doesn't pass all the third party settings and alterations yet.I'm not yet sure how to solve this, but as we can see it's specific to third party alterations, I'm reducing the priority to normal.