plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
254 stars 191 forks source link

plone-pat-modal improper redirect on folder contents (classic UI) #3989

Closed ewohnlich closed 2 months ago

ewohnlich commented 3 months ago

Plone 6.0.11 with Classic UI, no addons.

I am getting some different behavior on workflow changes depending on if I'm on the folder contents page or not. The weird part is that I am not using any of the elements of the folder contents area - this is entirely edit toolbar steps.

We can use https://classic.demo.plone.org/en/demo to demonstrate.

  1. Go to the Demo folder
  2. Go to Folder Contents
  3. In the edit toolbar, select State -> Advanced
  4. I selected 'include all items' and the transition Retract

The result is that the folder contents page is then reloaded within that modal, instead of redirecting that entire page.

image

If you perform the same steps on the View page it correctly closes the modal and redirects the whole page.

rohnsha0 commented 3 months ago

confirmed... the modal is not being closed and the table is rendered inside the modal itself

-------tested on-------
Plone 6.0.11 (6022)
CMF 3.5
Zope 5.9
Python 3.11.9 (main, May 14 2024, 08:32:26) [GCC 10.2.1 20210110]
PIL 9.5.0 (Pillow)
rohnsha0 commented 3 months ago

also I wasnt able to find any way to create folders in latest Plone 6.1.0a5.dev0 (6104) @stevepiercy @petschki @mauritsvanrees

stevepiercy commented 3 months ago

@ewohnlich in which version of Plone did this work correctly for you?

Does it work in Plone 6.0.12?

You can also look back at release notes in https://dist.plone.org/release/ to see if there was a change in folder contents redirection.

Ping @plone/classicui-team for help to isolate the package for this issue. I have no clue.

mauritsvanrees commented 3 months ago

I can confirm the original problem, also on Plone 6.0.12 (Classic Demo site has been updated). Strange.

@rohnsha0 wrote:

also I wasnt able to find any way to create folders in latest Plone 6.1.0a5.dev0 (6104)

But this is a completely different problem and I cannot reproduce it. I have created a folder and subfolder here (but that is the demo site, so the contents may be gone when you check). It is just the standard 'Add new' in the actions menu of the toolbar and the select Folder. If that problem persists, please create a separate issue with steps on how to reproduce it.

ewohnlich commented 3 months ago

@stevepiercy I have not viewed it working correctly in any version unfortunately.

rohnsha0 commented 3 months ago

But this is a completely different problem and I cannot reproduce it. I have created a folder and subfolder here (but that is the demo site, so the contents may be gone when you check). It is just the standard 'Add new' in the actions menu of the toolbar and the select Folder.

the demo site, you're referring to runs on plone: 6.0.12 @mauritsvanrees

stevepiercy commented 3 months ago

@ewohnlich thank you for confirming that this has always been the case, as far as you know.

@rohnsha0 please create a new issue for what you experienced, with steps for how to reproduce it, and do not pile onto this issue. Also there is no need to @ individuals. Thank you!

petschki commented 2 months ago

also I wasnt able to find any way to create folders in latest Plone 6.1.0a5.dev0 (6104) @stevepiercy @petschki @mauritsvanrees

just out of curiosity: did you create a "Classic-UI" Plone Site? Because in "Volto" Plone sites there is no more Folder ... there are folderish Page items.

rohnsha0 commented 2 months ago

also I wasnt able to find any way to create folders in latest Plone 6.1.0a5.dev0 (6104) @stevepiercy @petschki @mauritsvanrees

just out of curiosity: did you create a "Classic-UI" Plone Site? Because in "Volto" Plone sites there is no more Folder ... there are folderish Page items.

yaaa... it was due to some misunderstanding... but clear now! thanks!

petschki commented 2 months ago

I remember having the same issue when setting the default page. The solution there was to add the following to the data-pat-plone-modal options:

{"actionOptions": {"redirectOnResponse": True}}

Since this is in the toolbar the relevant code is in plone.app.contentmenu ... see https://github.com/plone/plone.app.contentmenu/blob/master/plone/app/contentmenu/menu.py#L896-L900

petschki commented 2 months ago

Extra Note: the doubled statusmessage in the modal gets fixed when I merge this PR https://github.com/plone/mockup/pull/1387 ... due to my vacation it didn't get into the latest release ... sorry.