Closed sauzher closed 2 months ago
https://classic.demo.plone.org/en/bar/content_status_modify?workflow_action=retract&_authenticator=xyz this is the link, the bug is in https://github.com/plone/plone.app.layout/blob/master/plone/app/layout/viewlets/toolbar*
But the link does not explain why the page itself change status...
What happens if you put two pages inside a folder, and unpublish only one of the two pages?
@stevepiercy The issues raises only when the page is set as defaultPage
of its container. Only one page at time can be the default.
@yurj the toolbar link is 404. Alas, the plone demo site is automatically reset often to be useful as reference here.
it is 404 because I've deleted the `_authenticator' value. The main part was the link pointing to the folder instead of the page.
I'm thinking it to be a feature:
# If this item is the default page in its parent, attempt to publish that
# too. It may not be possible, of course
if check_default_page_via_view(context, self.request):
parent = aq_parent(context)
try:
parent_modify_view = getMultiAdapter(
(parent, self.request), name="content_status_modify"
)
parent_modify_view(
workflow_action,
comment,
effective_date=effective_date,
expiration_date=expiration_date,
)
It is there from many years, still in content_status_modify.cpy
script.
I think it's a feature, too. It does not make sense to publish an empty container. If you retract the default view of a container, then the container itself should also be retracted. If you want to have the container remain published, then set another page as the default view.
There's a discussion for the issue here: https://community.plone.org/t/workflow-transition-on-defaultpage-is-propagated-to-its-container/19318
I would also say this is the expected behavior for defaultPages. Otherwise you can change the folder state only via folder_contents or we have to implement an extra action in the toolbar for the "defaultPageContainerState" which adds extra complexity to the already complex "default page" thinking ...
EDIT: In Volto there are no Folders at all, so the folderish page behaves the same like Classic-UI defaultPage when you change workflow states ... which all in all is more understandable, than the other way IMHO
I would also say this is expected behavior. It may have surprised you, but not doing it this way would be more surprising.
BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)
What I did:
Step to reproduce on a vanilla plone4, plone5.2 or plone6 classic:
What I expect to happen:
What actually happened:
changed folder BAR state also
The same happens if page BAZ and foler BAR are private and you publish the page BAZ. You'll get BAR published also. The same happens despite the workflow associated on the contents. It seems that the matters is the ID of the applied transaction.
What version of Plone/ Addons I am using: