Revision revert links in workspace respond with 404 not found

Created on 11 April 2024, 12 months ago

Problem/Motivation

When viewing revisions inside a workspace, the view includes links that respond with 404 page not found.

Steps to reproduce

1. create a node
2. create a workspace
3. switch to the workspace and create a new revision of a node
4. view revisions - the revision in the workspace is shown as the current revision
5. click on revert for the other revision (i.e. the current live revision)
6. this page responds with 404

Proposed resolution

tbc - prevent the option of reverting to the current live revision?
When reverting to other (non-current) revisions, a warning appears: "Form should not be submitted in a workspace"

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

10.2 ✨

Component
WorkspacesΒ  β†’

Last updated about 1 month ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom malcomio

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @malcomio
  • Status changed to Needs work 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States xjm

    We would need a merge request created against 11.x first (which would be backported to other branches once committed). (Also, the existing branch appears to be empty.) Thanks!

  • First commit to issue fork.
  • s_leu β†’ changed the visibility of the branch 3440304-revision-revert-links to hidden.

  • Pipeline finished with Success
    4 months ago
    Total: 717s
    #370904
  • The MR i opened here in combination with the changes of the MR for πŸ“Œ Allow viewing and reverting to live revisions inside workspaces Active will allow reverting to non default revisions inside a workspace. It's worth to note that the MR for wse will also enable listing of live revisions inside workspaces.

    The MR here will only change core's entity and node access control handlers in a way which will allow us to alter access for revert operations on default revisions.

  • s_leu β†’ changed the visibility of the branch 3440304-non-default-revision-revert-10.x to hidden.

  • First commit to issue fork.
  • Pipeline finished with Success
    2 months ago
    Total: 1398s
    #408627
  • Pipeline finished with Failed
    2 months ago
    Total: 430s
    #409172
  • Pipeline finished with Failed
    2 months ago
    Total: 85s
    #411083
  • Pipeline finished with Failed
    2 months ago
    Total: 1278s
    #414899
  • Pipeline finished with Failed
    about 2 months ago
    Total: 139s
    #414963
  • Pipeline finished with Success
    about 2 months ago
    Total: 7441s
    #414965
  • Pipeline finished with Failed
    about 2 months ago
    Total: 881s
    #415084
  • Pipeline finished with Success
    about 2 months ago
    Total: 1357s
    #415437
  • πŸ‡·πŸ‡΄Romania amateescu

    The original problem from the current issue summary was fixed in πŸ“Œ Revert and Delete actions should not be available for the current revision Active , but that issue introduced a new problem: when you have pending revisions (e.g. make changes in a workspace), you can not revert to the default revision, while you can revert the latest (workspace) revision. This doesn't make sense and it was actually one of the goals of the issue mentioned above, but somehow missed in the implementation.

    The current MR is fixing the new problem in the entity API, so I'm going to repurpose this issue since it's not workspace-specific anymore.

  • Pipeline finished with Success
    about 2 months ago
    Total: 2485s
    #415599
  • Status changed to Needs review about 1 month ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Leaving in review for others

    But aren't we losing coverage with all the tests that needed to be updated? Also won't this be introducing a new behavior for users. Tests all seem to be reverting what it was originally testing.
    Example
    Link should appear => Link should not appear now

  • πŸ‡·πŸ‡΄Romania amateescu

    Re #11: Those test changes are reverting the wrong assumptions made in πŸ“Œ Revert and Delete actions should not be available for the current revision Active , which didn't take into account that it should be possible to revert to the default revision when there are pending revisions.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Gotcha, will lean on that then and in that case change seems fine

Production build 0.71.5 2024