I fail to open /admin/gdpr/tasks page with the following error:

The website encountered an unexpected error. Please try again later.
Error: Call to a member function toLink() on null in Drupal\gdpr_tasks\TaskListBuilder->buildRow() (line 77 of modules/gdpr/modules/gdpr_tasks/src/TaskListBuilder.php).
Drupal\gdpr_tasks\TaskListBuilder->buildRow(Object) (Line: 179)
Drupal\gdpr_tasks\TaskListBuilder->render() (Line: 23)
Drupal\Core\Entity\Controller\EntityListController->listing('gdpr_task')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Drupal 8 and all modules are fully updated, and I have tried flush cache.
FYI: /admin/gdpr/tasks/gdpr_task_type works OK.

Issue fork gdpr-3221673

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

Matus Grinvalsky created an issue. See original summary.

matus grinvalsky’s picture

Component: User interface » Code
matus grinvalsky’s picture

Seems that problem was caused by RTF being initiated by user that had been deleted before GDPR RTF task had been reviewed by admin and run.

Once I deleted the RTF task for non/existent user, the issue had been fixed.

Seems like better handling of this scenario is needed...

MrDaleSmith made their first commit to this issue’s fork.

mrdalesmith’s picture

Status: Active » Needs review

This is because the TaskLIstBuilder is attempting to get a link from a user that no longer exists to display their request in the table: the code used is standard so I don't think it's the problem - the real issue is that the GDPR Tasks module doesn't respond correctly to users being deleted.

There's probably a conversation to be had about whether the code should carry out a full Request To Forget process for the user without admin approval if their account is being deleted, but for now I've just added code to delete any GDPR Task entities related to a user if their account is deleted.

rajeshreeputra’s picture

Status: Needs review » Reviewed & tested by the community

works good, RTBC

rajeshreeputra’s picture

rajeshreeputra’s picture

Status: Reviewed & tested by the community » Fixed

Merged MR in 3.x branch.

Status: Fixed » Closed (fixed)

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