- πΊπΈUnited States bdanin
This still errors for me with a nested paragraph:
ResponseText: Error: Call to undefined method Drupal\block_content\Entity\BlockContent::getParentEntity() in Drupal\scanner\Plugin\Scanner\Paragraph->search() (line 73 of /app/docroot/modules/contrib/scanner/src/Plugin/Scanner/Paragraph.php).
- Status changed to Needs work
over 1 year ago 12:46pm 10 May 2023 - πΊπΈUnited States DamienMcKenna NH, USA
That error indicates there's a block being loaded, not a paragraph; we probably need to update the logic to protect against that.
- πΊπΈUnited States bdanin
It's a paragraph inside a block that's loading.
- πΊπΈUnited States earthday47 New York
I needed to reroll the patch in #20 for 1.0-rc7. I made a couple of code formatting tweaks but left the logic alone - there are some things in there that are a little unusual, goto and while(1==1) , that make it a little hard to follow. It probably needs a little more work.
- last update
over 1 year ago 3 pass - Status changed to Needs review
over 1 year ago 7:31pm 16 June 2023 - πΊπΈUnited States DamienMcKenna NH, USA
Thanks for rerolling it, glad to see the tests pass now.
- Status changed to Needs work
over 1 year ago 7:34pm 16 June 2023 - πΊπΈUnited States DamienMcKenna NH, USA
The patch needs work:
1. This line:
+ checkPE:
+ if (is_null($parentEntity)) goto checkPE;
That gives off some bad code smell.
2. This part needs cleaning up:
+ // Two or more levels of nesting. + else { + if (!is_null($parentEntity->getEntityTypeId())) { + while (1 == 1) { + if (is_null($parentEntity)) break; + $tempA = $parentEntity->getEntityTypeId(); + if (is_null($tempA)) break; + if ($tempA == 'node') break; + $parentEntity = $parentEntity->getParentEntity(); + } + } + }
- π¨π¦Canada gwvoigt London, ON π¨π¦
Last patch gives me:
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=410&op=do_nojs&op=do
StatusText: parsererror
ResponseText: Error: Call to undefined method Drupal\paragraphs\Entity\Paragraph::getTitle() in Drupal\scanner\Plugin\Scanner\Paragraph->search() (line 115 of /app/web/modules/contrib/scanner/src/Plugin/Scanner/Paragraph.php). - π¨π¦Canada gwvoigt London, ON π¨π¦
Last patch gives me:
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=410&op=do_nojs&op=do
StatusText: parsererror
ResponseText: Error: Call to undefined method Drupal\paragraphs\Entity\Paragraph::getTitle() in Drupal\scanner\Plugin\Scanner\Paragraph->search() (line 115 of /app/web/modules/contrib/scanner/src/Plugin/Scanner/Paragraph.php). - π¨π¦Canada gwvoigt London, ON π¨π¦
Modified patch from #25 to address issues from #28
- last update
over 1 year ago 3 pass - last update
over 1 year ago 3 pass - Status changed to Needs review
over 1 year ago 6:44pm 22 August 2023 - Status changed to Needs work
12 months ago 10:01pm 4 January 2024 - πΊπΈUnited States banoodle San Francisco, CA
I tried the patch from #30 on D10.2 site, but I still get the error reported in #28.
If a parent entity doesn't have getParentEntity() method, it returns the error below:
Error: Call to undefined method Drupal\block_content\Entity\BlockContent::getParentEntity() in Drupal\scanner\Plugin\Scanner\Paragraph->search() (line 70 of /var/www/html/web/docroot/modules/contrib/scanner/src/Plugin/Scanner/Paragraph.php)
- π©πͺGermany Anybody Porta Westfalica
I can confirm the issue from #33 regarding incompatibility with block_content (which is quite widely used). I created a separate issue for that now: π Incompatibility with block_content module Active
- π©πͺGermany Anybody Porta Westfalica
MR!1 looks very promising and the logic is much better than the existing. I think we should stop posting patches and instead finish the MR!1. Could someone please check, which changes the MR is missing from the comments and update it accordingly?
I also left some comments. I think we're quite close to fixing this!
- π©πͺGermany Anybody Porta Westfalica
Closed π Incompatibility with block_content module Active as duplicate.