Can't add an express detail block to page. When you drag the block in, it just shows a blue line across the top. The for to choose the entry you want never comes up. However adding a list block works fine. Upgraded to 5.8.1 hoping it would resolve the issue but no luck. Deleted and re-added express objects, etc, to no avail.
I have found where the block loading fails, but can't trace out why is fails. It fails with an error "Call to a member function getID() on null". on line 41 with getEntity()->getID()?>" So it would appear that the $expressAttributes contains a null value, however the code count($expessAttributes) does produce a (1). I assume I have something missing or incorrect in the database, but I can't find what table this is being pulled from, or what is missing. The previous dropdown is populated wit the correct express entity Id's and descriptions. It's hard to debug because it looks like it's using ajax and I'm having a hard time getting to display any errors at all. Thanks
</div>
<div class="form-group" data-container="express-entry-custom-attribute">
<?php echo $form->label('akID', t('Express Entry Attribute'))?>
<?php if (count($expressAttributes)) { ?>
<select name="exEntryAttributeKeyHandle" class="form-control">
<option value=""><?php echo t('** Select Attribute')?></option>
<?php foreach($expressAttributes as $ak) {
$settings = $ak->getAttributeKeySettings();
?>
<option data-entity-id="<?php echo $settings->getEntity()->getID()?>" <?php if ($ak->getAttributeKeyHandle() == $exEntryAttributeKeyHandle) { ?>selected="selected" <?php } ?> value="<?php echo $ak->getAttributeKeyHandle()?>"><?php echo $ak->getAttributeKeyDisplayName()?></option>
<?php } ?>
</select>
<?php } else { ?>
<p><?php echo t('There are no express entity page attributes defined.')?></p>
<?php } ?>
</div>
<div class="form-group">
<?php echo $form->label('exFormID', t('Display Data in Entity Form'))?>
<div data-container="express-entry-detail-form">
You are calling getEntity() which is a function of Express class on a Settings Class of the attribute. You should be calling getEntity() on Express object which you used to fetch the attributes from. I can't see an Express object in your code.