-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set the current workflowPlace of the ContentWorkflow only on a specific DimensionContent #92
Comments
in my opinion it should look like this:
|
After thinking through this a second time, I have the opinion that we should save the I think setting an additional
|
It's necessary to have I'm using following code to evaluate
The public function getPublished(): ?\DateTimeInterface
{
$contentProjection = $this->getContentProjection();
$dimension = $contentProjection->getDimension();
if (null === $dimension->getLocale()) {
return null;
}
if (!$contentProjection instanceof WorkflowInterface) {
return null;
}
return $contentProjection->getWorkflowPublished();
}
public function getPublishedState(): bool
{
$contentProjection = $this->getContentProjection();
$dimension = $contentProjection->getDimension();
if (null === $dimension->getLocale()) {
return false;
}
if (DimensionInterface::STAGE_LIVE === $dimension->getStage()) {
return true;
}
if (!$contentProjection instanceof WorkflowInterface) {
return true;
}
return $contentProjection->getWorkflowPlace() === WorkflowInterface::WORKFLOW_PLACE_PUBLISHED;
} Therefore it's necessary to have The
One way to achieve this would be a |
I feel like your comment is related to different issues, so i am trying to split the answer into different parts:
|
The
ContentWorkflow
service allows to apply a transition on acontentRichEntity
and givendimensionAttributes
. Because thecurrentPlace
of ancontentRichEntity
might differ based on the locale, thecurrentPlace
is stored on theDimensionContent
entity. This makes sense, as the english version of a page might be published while the german version is still in review.In most setups, there are 4
DimensionContent
entities that are related to a specific locale:Right now, all of these
DimensionContent
entities contain acurrentPlace
property, but the ContentWorkflow only updates thecurrentPlace
property of theDraft Stage / Localized
DimensionContent
. This means the database will contain the following values for thecurrentPlace
attributes, if acontentRichEntity
is published in a specific locale:unpublished
published
unpublished
unpublished
In my opinion, it is very confusing that the
Draft Stage / Localized
DimensionContent
is the only entity that contains the correctcurrentPlace
. We should adjust this behaviour to one of the following strategies:currentPlace
of all entities. This is problematic because there is no "right" value for the unlocalizedDimensionContent
currentPlace
only on theDraft Stage / Localized
DimensionContent
. Set thecurrentPlace
of all otherDimensionContent
entities tonull
The text was updated successfully, but these errors were encountered: