Products.cmfplone: Remove all form controller scripts

Created on 26 Feb 2020  路  4Comments  路  Source: plone/Products.CMFPlone

On Plone 5.2 Python 3 we have these form controller scripts:

$ find -L . -name '*.vpy'
./Products/CMFPlone/skins/plone_form_scripts/validate_content_status_modify.vpy
$ find -L . -name '*.cpy'
./Products/CMFPlone/skins/plone_form_scripts/content_status_modify.cpy
./Products/CMFPlone/skins/plone_scripts/folder_publish.cpy
  • validate_content_status_modify.vpy is only used by content_status_modify.cpy
  • content_status_modify.cpy is used all over the place
  • folder_publish.cpy is only used in plone/app/content/browser/content_status_history.py, so maybe those two could be integrated

These should be turned into browser views. And when we do that, maybe not all of them are needed anymore because we merge them.

After this, we could get rid of Products.CMFFormController and the portal_form_controller tool.

This is for Plone 6.0.

enhancement normal

Most helpful comment

Done! These lists in Plone 6.0 coredev parts/packages are now empty:

$ find -L . -name '*.vpy'
$ find -L . -name '*.cpy'

As I wrote in this comment, further improvements could be done:

  • Change various action urls in GenericSetup to use /@@content_status_modify instead of /content_status_modify for a slight performance increase. For example in this workflow definition.
  • Same probably for some other urls.
  • Add an upgrade step for this.

All 4 comments

See also issue #1801.

I am working on removing content_status_modify.cpy and its validator validate_content_status_modify.vpy.
See https://github.com/plone/plone.app.content/pull/216 and https://github.com/plone/Products.CMFPlone/pull/3193
Seems to work, but definitely needs changes in the tests.

Done! These lists in Plone 6.0 coredev parts/packages are now empty:

$ find -L . -name '*.vpy'
$ find -L . -name '*.cpy'

As I wrote in this comment, further improvements could be done:

  • Change various action urls in GenericSetup to use /@@content_status_modify instead of /content_status_modify for a slight performance increase. For example in this workflow definition.
  • Same probably for some other urls.
  • Add an upgrade step for this.

https://github.com/plone/buildout.coredev/pull/696 removes the Products.CMFFormController package and portal_form_controller tool.

Was this page helpful?
0 / 5 - 0 ratings