plone / Products.CMFPlone

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

Problem to register new tool in "portal_controlpanel" and active news addons need to register icons in site setup #1959

Closed claytonc closed 2 years ago

claytonc commented 7 years ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

1 - Site Setup => Add-ons => check "Workflow Policy Support (CMFPlacefulWorkflow)" and clink in button Activate.

2 - ZMI => portal_controlpanel => register new tool

3 - Acess url: http://localhost:8080/Plone/portal_controlpanel/addAction

What I expect to happen:

1 - Install add-on and show icon in Site Setup

2 - Register new tool in Site Seup

3 - BadRequest: ... The parameter, id, was omitted from the request. ...

What actually happened:

1 - Install add-on but not register icon in Site Setup not possibility configure Workflow Policy.

2 - Show page 404 "This page does not seem to exist… " .

3 - Show page 4040 "This page does not seem to exist…"

What version of Plone/ Addons I am using:

Plone 4.3.11 / Plone Default / Unified Installer

01 - 01

02 - 02

03 - 03

mauritsvanrees commented 7 years ago

Partially confirmed.

claytonc commented 7 years ago

@mauritsvanrees

In add-ons:

1 - CMFPlacefulWorkflow => Activate 2 - CMFPlacefulWorkflow => Deactivate 3 - CMFPlacefulWorkflow => Activate again, the icon not is added in control panel.

claytonc commented 7 years ago

4 - CMFPlacefulWorkflow => Deactivate again => KeyError: 'portal_placeful_workflow'

mauritsvanrees commented 7 years ago

Huh, that is odd. I can confirm it. So:

  1. The first time you active CMFPlacefulWorkflow all is fine.
  2. After deactivation everything seems okay too, but maybe something is not quite right at this point already.
  3. A second activation finishes without error, but goes wrong: the control panel icon is not installed. And the portal_placeful_workflow tool is missing.
  4. That results in a second deactivation failing.

There seems to be something wrong in the install or uninstall code of CMFPlacefulWorkflow. Or both.

mauritsvanrees commented 7 years ago

Workaround:

mauritsvanrees commented 2 years ago

Checked in 5.2 and 6.0. I cannot reproduce the CMFPlacefulWorkflow problem, so that was fixed. I can reproduce the problem that adding a control panel action in the ZMI does not work. My fix for that must have not made it to all branches. I have made PRs for 5.2 and 6.0.