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 versions_history_form #82

Open
2 tasks
mauritsvanrees opened this issue Dec 22, 2021 · 2 comments
Open
2 tasks

Remove versions_history_form #82

mauritsvanrees opened this issue Dec 22, 2021 · 2 comments

Comments

@mauritsvanrees
Copy link
Sponsor Member

In PR #81 I have moved this skin template to a browser view. But I think it is best removed, because it is mostly a duplicate.
Our versions_history_form is roughly the same as @@historyview in plone.app.layout, which is a small wrapper around @@contenthistory in plone.app.layout, which is a viewlet turned into a view. Their version looks nicer. But our versions_history_form has a preview (which contenthistory points to) and a form to add a new version, if the policy is manual.

So:

  • Move the preview to contenthistory in plone.app.layout. Or make it a separate page that still lives in CMFEditions. Possibly let contenthistory load it as a popup.
  • Move the form to add a new version into contenthistory.

BTW, I saw a couple of CSRF errors when working on the PR yesterday. Not sure which template or view causes this. Would be good to check.

@ale-rt
Copy link
Member

ale-rt commented Jan 15, 2022

I noted that as well, the error do not show up when working with the @@historyview.

@pgrunewald
Copy link

I stumbled upon the CSRF error as well. It is caused how the link to the versions_history_form template is being constructed. The link from @@historyview has the plone.protect-token ("authenticator") included.

Compare:
from @@historyview: http://localhost:8060/Plone/hello-plone/versions_history_form?version_id=3&_authenticator=924bf3698b0ec56922c3639e161f33516b6602c4#version_preview
vs:
from versions_history_form: http://localhost:8060/Plone/hello-plone/versions_history_form?version_id=3#version_preview

This token basically allows the write operation of an temporary attribute (done in retrieve() in CopyModifyMergeRepositoryTool.py). Anyhow, this issue is revolved, when we stick to the solution in @@historyview.

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

No branches or pull requests

3 participants