Skip to content

Commit ce2ee86

Browse files
Merge pull request #62 from punktDe/bugfix/do-not-throw-on-missing-form
BUGFIX: Do not throw an exception on missing form node
2 parents d599cba + 5d732cb commit ce2ee86

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Classes/SignalSlot/NodeSignalInterceptor.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
use Neos\ContentRepository\Domain\Model\Workspace;
1313
use Neos\Eel\FlowQuery\FlowQuery;
1414
use Neos\Flow\Core\Bootstrap;
15+
use Neos\Flow\Log\Utility\LogEnvironment;
16+
use Psr\Log\LoggerInterface;
1517
use PunktDe\Form\Persistence\Domain\ScheduledExport\ScheduledExportService;
1618
use PunktDe\Form\Persistence\FormPersistenceNodeTypeInterface;
1719

@@ -25,7 +27,6 @@ class NodeSignalInterceptor
2527
*/
2628
public static function nodePublished(NodeInterface $node, Workspace $targetWorkspace): void
2729
{
28-
2930
if (!$targetWorkspace->isPublicWorkspace()) {
3031
return;
3132
}
@@ -38,7 +39,9 @@ public static function nodePublished(NodeInterface $node, Workspace $targetWorks
3839
$form = (new FlowQuery([$node]))->closest('[instanceof Neos.Form.Builder:NodeBasedForm]')->get(0);
3940

4041
if (!$form instanceof NodeInterface) {
41-
throw new \Exception('Error while saving the scheduled export definition. No form node could be determined', 1627803571);
42+
$logger = Bootstrap::$staticObjectManager->get(LoggerInterface::class);
43+
$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__));
44+
return;
4245
}
4346

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

0 commit comments

Comments
 (0)