Problem/Motivation
When displaying a View that includes the "Spam Protection Status Related Entity Label" field, a fatal error occurs if the related entity no longer exists (orphaned record) or cannot be loaded.
Error message:
Error: Call to a member function toLink() on null in Drupal\nobotiq_spam_protection\Plugin\views\field\SpamProtectionStatusRelatedEntityLabel->render() (line 78)
Steps to reproduce
1. Install nobotiq_spam_protection.
2. Create a View showing Spam Protection Status entities.
3. Delete an entity that was previously flagged/protected (creating an orphaned reference).
4. Access the View.
5. The page crashes with a Fatal Error.
Issue fork nobotiq_spam_protection-3580860
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
volegerLooks good