Open finnlewis opened 3 years ago
If a referenced entity has been moved the references field should be update with https://github.com/localgovdrupal/localgov_guides/blob/28bc1b8695f49c14803bc82cfdd2fd7006859a2a/src/ChildParentRelationship.php#L74 The save should clear the cache.
If the referenced entity is deleted I'm missing are we missing a hook_entity_delete() https://github.com/localgovdrupal/localgov_guides/blob/master/localgov_guides.module
Not sure of specific steps to reproduce yet, but on Lambeth live site, one of the guid pages got into a twist.
The page would not load, generating this error.
Editing and saving the node resolved the issue.
Debugging locally revealed that this line was choking:
https://github.com/localgovdrupal/localgov_guides/blob/master/src/Plugin/Block/GuidesPrevNextBlock.php#L26
$next_url = $this->guidePages[0]->toUrl();
The guidePages[0] did not exist, but guidePages[1] did!.
So I wonder if maybe this is a case of adding guide pages then removing them causing some internal logic confiusion.
Or maybe caching?