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

Remove all form controller scripts #3057

Closed
mauritsvanrees opened this issue Feb 26, 2020 · 4 comments
Closed

Remove all form controller scripts #3057

mauritsvanrees opened this issue Feb 26, 2020 · 4 comments

Comments

@mauritsvanrees
Copy link
Member

mauritsvanrees commented Feb 26, 2020

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.

@mauritsvanrees
Copy link
Member Author

See also issue #1801.

@mauritsvanrees
Copy link
Member Author

I am working on removing content_status_modify.cpy and its validator validate_content_status_modify.vpy.
See plone/plone.app.content#216 and #3193
Seems to work, but definitely needs changes in the tests.

@mauritsvanrees
Copy link
Member Author

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.

@mauritsvanrees
Copy link
Member Author

plone/buildout.coredev#696 removes the Products.CMFFormController package and portal_form_controller tool.

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

No branches or pull requests

1 participant