- Issue created by @lauriii
- 🇫🇮Finland lauriii Finland
When new content is created as draft, the content should be marked as published when the "Publish all changes" is pressed but we're creating an unpublished skeleton entity. However, there's also the archived state which I would imagine would use the status field as well, but in that case we'd want them to unarchive before the content would be published. I'm not sure how we'd know in which scenario we're in.
- 🇺🇸United States mglaman WI, USA
There are some big assumptions here. That
ApiPublishAllController
should take all entities which are\Drupal\Core\Entity\EntityPublishedInterface
and call\Drupal\Core\Entity\EntityPublishedInterface::setPublished
.How can something remain "Archived" then? Since new entities cannot be staged, we are creating them as unpublished to start.
- 🇫🇮Finland lauriii Finland
I think it's fine to punt the archived state to a follow-up issue. I added here for context because it would be good to think how we'll make it happen but we don't really need it right now.
Note that we would only do this for entities that have autosaved changes associated to them.
- 🇺🇸United States mglaman WI, USA
Pushed https://git.drupalcode.org/project/experience_builder/-/merge_requests/6..., I can update the
@todo
when it is added. This feels like a perfect case for content moderation and a specific workflow. If the state is archived, we will not make published. Or if we do not want content moderation, it's another use for a trinary state field: 0=TO_BE_PUBLISHED, 1=PUBLISHED, 2=ARCHIVE. On "Publish all changes" all items in 0=TO_BE_PUBLISHED are published. - 🇺🇸United States mglaman WI, USA
Needs tests, but we have a basic code change that could use review and feedback
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
The same problem exists for "article" nodes. Shouldn't that be fixed in the same way? That's also what I was referring to at #3498525-35: Allow XB to be used on all bundles of all revisionable, publishable content entity types → .
- 🇫🇮Finland lauriii Finland
This should work eventually for Nodes (and other content edited in XB). However, XB doesn't currently support anything except pages (except for development). I doubt we would implement the entity creation the same way for other entity types like we did for pages so it seems that trying to fix it right now would be premature. However, If we can easily fix this for other content entity types at once, that's great.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Limiting to XB's own
Page
is IMHO dangerous because it doesn't expose us to the wider reality. Which means we'll end up with known unknowns and unknown unknowns.Furthermore, the status badge ( ✨ The status badge should indicate if there are changes to the page Active ) would otherwise fail to work correctly for article nodes.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Almost done! Some clarity nits, and also one thing that could easily not be tightly coupled, so we shouldn't. 🙏
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Fixed 2 comment nits myself: https://git.drupalcode.org/project/experience_builder/-/merge_requests/6...
Minor naming thing left, I defer to @tedbow how to handle it: https://git.drupalcode.org/project/experience_builder/-/merge_requests/6...
Automatically closed - issue fixed for 2 weeks with no activity.