Skip to content

Commit

Permalink
Merge pull request #62 from punktDe/bugfix/do-not-throw-on-missing-form
Browse files Browse the repository at this point in the history
BUGFIX: Do not throw an exception on missing form node
  • Loading branch information
daniellienert authored Jan 28, 2025
2 parents d599cba + 5d732cb commit ce2ee86
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Classes/SignalSlot/NodeSignalInterceptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
use Neos\ContentRepository\Domain\Model\Workspace;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Flow\Core\Bootstrap;
use Neos\Flow\Log\Utility\LogEnvironment;
use Psr\Log\LoggerInterface;
use PunktDe\Form\Persistence\Domain\ScheduledExport\ScheduledExportService;
use PunktDe\Form\Persistence\FormPersistenceNodeTypeInterface;

Expand All @@ -25,7 +27,6 @@ class NodeSignalInterceptor
*/
public static function nodePublished(NodeInterface $node, Workspace $targetWorkspace): void
{

if (!$targetWorkspace->isPublicWorkspace()) {
return;
}
Expand All @@ -38,7 +39,9 @@ public static function nodePublished(NodeInterface $node, Workspace $targetWorks
$form = (new FlowQuery([$node]))->closest('[instanceof Neos.Form.Builder:NodeBasedForm]')->get(0);

if (!$form instanceof NodeInterface) {
throw new \Exception('Error while saving the scheduled export definition. No form node could be determined', 1627803571);
$logger = Bootstrap::$staticObjectManager->get(LoggerInterface::class);
$logger->error(sprintf('Error while saving the scheduled export definition for form data finisher with identifier %s. No form node could be determined', $node->getIdentifier()), LogEnvironment::fromMethodName(__METHOD__));
return;
}

$formIdentifier = $form->getProperty('identifier');
Expand Down

0 comments on commit ce2ee86

Please sign in to comment.