Skip to content

Commit c095f18

Browse files
authored
Merge pull request #21 from Flowpack/image-bugfix
BUGFIX: thumbnails were not stored during rendering
2 parents 47f6e95 + 218865b commit c095f18

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

Classes/NodeRendering/NodeRenderer.php

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,6 @@ class NodeRenderer
8888
*/
8989
protected $contextFactory;
9090

91-
/**
92-
* @Flow\Inject
93-
* @var NodeDataRepository
94-
*/
95-
protected $nodeDataRepository;
96-
97-
/**
98-
* @Flow\Inject
99-
* @var NodeFactory
100-
*/
101-
protected $nodeFactory;
102-
10391
/**
10492
* @Flow\Inject
10593
* @var ContentReleaseManager
@@ -146,6 +134,11 @@ public function render(ContentReleaseIdentifier $contentReleaseIdentifier, Conte
146134

147135
try {
148136
$this->renderDocumentNodeVariant($enumeratedNode, $contentReleaseIdentifier, $contentReleaseLogger);
137+
// BUGFIX: Because rendering a document node can update Thumbnails and their connected Persistent Resource
138+
// objects (= Doctrine Entities), we need to *persist* these changes. Otherwise, we will have broken
139+
// images, which will re-appear once you open the page in the backend (because image URL generation
140+
// is fully deterministic). This happened 12/2022 to us.
141+
$this->persistenceManager->persistAll();
149142
} finally {
150143
$removalSuccess = $this->redisRenderingQueue->removeRenderingJobFromReservedList($contentReleaseIdentifier, $enumeratedNode, $rendererIdentifier);
151144
if ($removalSuccess === false) {

0 commit comments

Comments
 (0)