Details
-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
None
-
[2.2] Sprint 1
Description
There is wrong VersionNo emit in method createContentDraft (eZ\Publish\Core\SignalSlot\ContentService class in line 320).
When you create new content draft you got new versionNo for this draft but in SignalSlot you have lastest content published versionNo.
I think should be added something like this to parameter array:
'newVersionNo' => $returnValue->getVersionInfo()->versionNo
Proposed solution:
public function createContentDraft(ContentInfo $contentInfo, VersionInfo $versionInfo = null, User $user = null) { $returnValue = $this->service->createContentDraft($contentInfo, $versionInfo, $user); $this->signalDispatcher->emit( new CreateContentDraftSignal( array( 'contentId' => $contentInfo->id, 'versionNo' => ($versionInfo !== null ? $versionInfo->versionNo : null), 'newVersionNo' => $returnValue->getVersionInfo()->versionNo, 'userId' => ($user !== null ? $user->id : null), ) ) ); return $returnValue; }