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.

Command icon 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

yurii novak created an issue. See original summary.

voleger’s picture

Assigned: yurii novak » Unassigned
Status: Active » Fixed

Looks good

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • voleger committed b1b92a40 on 1.0.x authored by yurii novak
    fix: #3580860 Error: Call to a member function toLink() on null in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.