Provide link to latest revision of moderated entity

Created on 3 September 2017, almost 7 years ago
Updated 30 November 2023, 7 months ago

Hi!

I have a view that lists draft nodes ( I added Content moderation state as a relationship and a filter: (Content moderation state) Content moderation state: Moderation state (=draft) ), that displays the next fields: node title as link to node, and links to edit and delete the node.

The first time when a user creates a node that needs moderation, the /node/NID/latest page does not exists
In this time my moderators need to link the node title to /node/NID to find moderation form, but in the second time, when moderator was published the node, but user edits it again, the link should be /node/NID/latest because moderation form moves to this page

Support request: I can overwrite the link in a MYMODULE_views_preprocess_field() hook implementation, but in this case how can I check node/NID/latest exists or not?
[OR]
Feature request: Second solution could be a views field called Content: Link to moderate Content like Content: Link to edit Content or Content: Link to delete Content

Is there a chance for the second?

✨ Feature request
Status

Needs work

Version

11.0 🔥

Component
Content moderation  →

Last updated 1 day ago

  • Maintained by
  • 🇦🇺Australia @Sam152
Created by

🇭🇺Hungary fox mulder

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • The Needs Review Queue Bot → tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.

  • 🇮🇳India Nikhil_110

    Attached patch against Drupal 10.1.x

    Patch #34 is not applied for Drupal 10.1.x so Inter-diff file is not added.

    Checking patch core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php...
    Hunk #1 succeeded at 178 (offset -3 lines).
    Checking patch core/modules/field/tests/src/Kernel/String/StringFormatterTest.php...
    Checking patch core/modules/system/tests/modules/entity_test/entity_test.routing.yml...
    Hunk #1 succeeded at 55 (offset -13 lines).
    Checking patch core/modules/system/tests/modules/entity_test/src/Controller/EntityTestController.php...
    Checking patch core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php...
    error: while searching for:
     *     "delete-multiple-form" = "/entity_test_rev/delete_multiple",
     *     "edit-form" = "/entity_test_rev/manage/{entity_test_rev}/edit",
     *     "revision" = "/entity_test_rev/{entity_test_rev}/revision/{entity_test_rev_revision}/view",
     *   }
     * )
     */
    
    error: patch failed: core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php:44
    error: core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php: patch does not apply
    Checking patch core/modules/views/config/schema/views.field.schema.yml...
    Checking patch core/modules/views/src/EntityViewsData.php...
    Hunk #1 succeeded at 267 (offset 3 lines).
    Checking patch core/modules/views/src/Plugin/views/field/LinkToLatestRevision.php...
  • 🇮🇳India Nikhil_110

    Fixed #39 Cc Issue

  • Status changed to Needs review about 1 year ago
  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States smustgrave

    This could use an issue summary update. What is the proposed solution? Api changes? What is remaining? That would be a good start to help move this issue forward.

  • 🇦🇺Australia alex.skrypnyk Melbourne

    Re-roll of #40 for 10.1.6

Production build 0.69.0 2024