Skip to content

Commit

Permalink
VACMS-15447: fixed php error in orphans report (#15451)
Browse files Browse the repository at this point in the history
  • Loading branch information
edmund-dunn authored Sep 29, 2023
1 parent f07392b commit 78ce347
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/sync/views.view.orphaned_paragraphs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ display:
type: full
options:
offset: 0
items_per_page: 2500
items_per_page: 20
total_pages: null
id: 0
tags:
Expand All @@ -499,6 +499,7 @@ display:
offset: false
offset_label: Offset
quantity: 9
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ public function preRender(ViewsPreRenderEvent $event): void {
foreach ($view->result as $key => $value) {
/** @var \Drupal\paragraphs\Entity\Paragraph $paragraph */
$paragraph = $value->_entity;
$top_parent = va_gov_backend_get_top_parent_entity($paragraph);
$tree = [];
$top_parent = va_gov_backend_get_top_parent_entity($paragraph, $tree);
$used = $this->purger->isUsed($paragraph);
if (!$used && !$top_parent) {
$link = $this->getTopParentEntityLink($paragraph);
Expand Down

0 comments on commit 78ce347

Please sign in to comment.