Ticket #6932 (closed Bug: fixed)

Opened 7 years ago

Last modified 4 years ago

"Revert to this version" should be HTTP POST, not GET

Reported by: limi Owned by: maurits
Priority: major Milestone: 3.3.5
Component: Versioning Version:
Keywords: TuneUp24 Cc: maurits

Description

Actions that change the state of the system should be HTTP POST actions.

Reverting to an earlier version replaces the existing content, and so should definitely be an HTTP POST.

Attachments

versions_history_form-with-buttons.png Download (42.4 KB) - added by maurits 4 years ago.

Change History

comment:1 Changed 7 years ago by alecm

  • Status changed from new to assigned
  • Milestone changed from 3.0 to 3.0.x

Well the change that's made is idempotent and reversible (e.g. we're not violating the http RFCs here, whereas we are doing in many other places), so I think we we can hold off on this for 3.0.1. It requires pretty big changes to the form, so I'd prefer to wait a bit.

comment:2 Changed 6 years ago by hannosch

  • Status changed from assigned to new
  • Owner alecm deleted

comment:3 Changed 6 years ago by gabdavhp

  • Keywords TuneUpSept26 added

comment:4 Changed 6 years ago by gabdavhp

  • Keywords TuneUpSept26, bigbug, blackbelt added; TuneUpSept26 removed

comment:5 Changed 6 years ago by gabdavhp

  • Keywords TuneUpSept26, removed

comment:6 Changed 4 years ago by jluvsu2

  • Keywords TuneUp23 added; bigbug, blackbelt removed

comment:7 Changed 4 years ago by jluvsu2

  • Keywords TuneUp24 added; TuneUp23 removed

comment:8 Changed 4 years ago by keul

  • Cc maurits added
  • Status changed from new to closed
  • Resolution set to fixed

I think that maurits fixed it at revision [101851] (on the collecrtive repository).

The current code use a form with method post.

comment:9 Changed 4 years ago by maurits

  • Status changed from closed to reopened
  • Resolution fixed deleted

My change is for the page you get when you click on one of the 'compare' links in the history viewlet. It fixes toggling between several ways of viewing the difference.

The non-post is on the versions_history_form, where you get when you click on one of the 'View this revision' links. There the 'Revert to this version' is a simple link instead of an input.

I'll reopen the ticket and have a look.

comment:10 Changed 4 years ago by maurits

  • Status changed from reopened to new
  • Owner set to maurits

Okay, the biggest part of versions_history_form.pt is a big table with a form around it. The form posts to versions_history, which is a mostly empty html page beginning with a span; so not really where you want to end up. Also, the form has no inputs or other form elements, so it is absolutely useless, unless it is used with some javascript or css that I am not aware of.

So I removed that form and changed the links of 'Revert to this revision' into very small forms, just like in plone/app/layout/viewlets/content_history.pt. Note: when I leave the form around the table you get several small forms within this big form and at least Firefox posts to the action of the big form (versions_history) instead of the action of the much closer form (posting to revertversion).

I'll add a screenshot with how it looks.

Changed 4 years ago by maurits

comment:11 Changed 4 years ago by maurits

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r106522.

Note: See TracTickets for help on using tickets.