Skip to content
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

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

Closed
claytonc opened this issue Mar 7, 2017 · 6 comments · Fixed by #3620

Comments

@claytonc
Copy link
Member

claytonc commented Mar 7, 2017

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

@claytonc claytonc added this to the Plone 4.3 milestone Mar 7, 2017
@mauritsvanrees
Copy link
Member

Partially confirmed.

  • When I install CMFPlacefulWorkflow in coredev 4.3, the control panel icon is added just fine. It points to http://localhost:8080/Plone/prefs_workflow_localpolicies_form. Is that page loading fine for you?

  • Adding via the ZMI does fail for me. And I see that I was the one who broke it, by removing a docstring... Sorry! I thought the addAction method did not need to be accessible directly via a url, but I was wrong. I will fix it.

@claytonc
Copy link
Member Author

claytonc commented Mar 7, 2017

@mauritsvanrees

In add-ons:

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

@claytonc
Copy link
Member Author

claytonc commented Mar 7, 2017

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

@mauritsvanrees
Copy link
Member

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 mauritsvanrees self-assigned this Mar 8, 2017
@mauritsvanrees
Copy link
Member

Workaround:

  • Go to portal_setup in the ZMI, and then the Import tab.
  • Select profile "Workflow Policy Support (CMFPlacefulWorkflow)" (profile-Products.CMFPlacefulWorkflow:CMFPlacefulWorkflow).
  • Select 'apply all profiles'. This makes sure the base dependency profile gets applied first.
  • Click 'Import all steps'

mauritsvanrees added a commit to plone/Products.CMFPlacefulWorkflow that referenced this issue Mar 8, 2017
Deactivating and then activating the add-on led to a missing tool and control panel icon.
Another deactivation would then fail.
Solution is to mark our base profile as uninstalled in the uninstall method.
This requires `Products.GenericSetup` 1.8.1 or higher.
Fixes plone/Products.CMFPlone#1959.
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Mar 8, 2017
Branch: refs/heads/1.5.x
Date: 2017-03-08T11:49:36+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/Products.CMFPlacefulWorkflow@28d8ad7

Fixed reinstall.

Deactivating and then activating the add-on led to a missing tool and control panel icon.
Another deactivation would then fail.
Solution is to mark our base profile as uninstalled in the uninstall method.
This requires `Products.GenericSetup` 1.8.1 or higher.
Fixes plone/Products.CMFPlone#1959.

Files changed:
M CHANGES.rst
M Products/CMFPlacefulWorkflow/Extensions/Install.py
M Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py
M setup.py
Repository: Products.CMFPlacefulWorkflow
Branch: refs/heads/1.5.x
Date: 2017-03-08T13:18:40+01:00
Author: Johannes Raggam (thet) <thetetet@gmail.com>
Commit: plone/Products.CMFPlacefulWorkflow@fa86345

Merge pull request #15 from plone/uninstall-base-15x

Fixed reinstall. [1.5.x]

Files changed:
M CHANGES.rst
M Products/CMFPlacefulWorkflow/Extensions/Install.py
M Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py
M setup.py
mauritsvanrees added a commit to plone/Products.CMFPlacefulWorkflow that referenced this issue Mar 8, 2017
Deactivating and then activating the add-on led to a missing tool and control panel icon.
Another deactivation would then fail.
Solution is to mark our base profile as uninstalled in the uninstall method.
This requires `Products.GenericSetup` 1.8.1 or higher.
Fixes plone/Products.CMFPlone#1959.
mauritsvanrees added a commit to plone/Products.CMFPlacefulWorkflow that referenced this issue Mar 8, 2017
And test that multiple installs and uninstalls work.
This actually worked already on Plone 5.1, but we now test it explicitly.
See plone/Products.CMFPlone#1959.
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Mar 8, 2017
Branch: refs/heads/1.6.x
Date: 2017-03-08T15:50:17+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/Products.CMFPlacefulWorkflow@d45c786

Fixed reinstall.

Deactivating and then activating the add-on led to a missing tool and control panel icon.
Another deactivation would then fail.
Solution is to mark our base profile as uninstalled in the uninstall method.
This requires `Products.GenericSetup` 1.8.1 or higher.
Fixes plone/Products.CMFPlone#1959.

Files changed:
M CHANGES.rst
M Products/CMFPlacefulWorkflow/Extensions/Install.py
M Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py
M setup.py
Repository: Products.CMFPlacefulWorkflow
Branch: refs/heads/1.6.x
Date: 2017-03-08T18:42:14+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/Products.CMFPlacefulWorkflow@04a8f84

Merge pull request #16 from plone/uninstall-base-16x

Fixed reinstall. [1.6.x]

Files changed:
M CHANGES.rst
M Products/CMFPlacefulWorkflow/Extensions/Install.py
M Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py
M setup.py
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Mar 9, 2017
Branch: refs/heads/master
Date: 2017-03-08T16:17:05+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/Products.CMFPlacefulWorkflow@6102dcf

Removed Plone 5.0 installer code from tests.

And test that multiple installs and uninstalls work.
This actually worked already on Plone 5.1, but we now test it explicitly.
See plone/Products.CMFPlone#1959.

Files changed:
M CHANGES.rst
M Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py
Repository: Products.CMFPlacefulWorkflow
Branch: refs/heads/master
Date: 2017-03-09T06:15:23+01:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/Products.CMFPlacefulWorkflow@b82531a

Merge pull request #17 from plone/remove-plone50-test-code-master

Removed Plone 5.0 installer code from tests.

Files changed:
M CHANGES.rst
M Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py
@mauritsvanrees
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants