When I try to set the current revision via the moderation tab I can only revert.

Steps to reproduce:
- When I create a landing page and publish.
- Create a new revision in draft mode.
- go to revisions tab
- click "Set as current revision"
- Taken to a page that instead asks about reverting the current revision

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

adam.weingarten created an issue. See original summary.

balsama’s picture

Interesting. I don't think this has been reported before.

Is this really just a problem with the verb not changing when the revision you are setting as default happens to be newer than the current default? I suspect "revert" is hardcoded and really means "switch". But I haven't tested that.

balsama’s picture

@phenaproxima suggests overriding the title callback to change the wording so it makes sense for newer and older.

phenaproxima’s picture

Status: Active » Needs review
balsama’s picture

Found a bug when testing this...

If you follow the steps in the original issue, the expected result is:
* Forward revision is set as default revision
* Default revision is unpublished
* Six total revisions remain (image in IS shows six)

Actual results
* Default revision remains unchanged
* New forward revision created that is a clone of the forward revision we wanted to make default

The STR are somewhat of an edge case. The accepted way to do this (un-publish the current revision) is to set the published entities workflow state to archived. So I'd be OK with just removing the option to "set as current revision" if the revision is forward. But I can also imagine some workflows that really want to be able to do this. (I might want to un-publish something and make all other editors see a specific draft when they visit the entity in the same action, for example.)

balsama’s picture

Status: Needs review » Needs work

I don't want to merge this until we figure out what's going on in #5 and, at a minimum, open a separate issue for it.

phenaproxima’s picture

Status: Needs work » Closed (outdated)

Lightning 2.x is no longer maintained, so I'm closing this issue.