Updated by #80

Problem/Motivation

Convert content revision table to view.

Proposed resolution

Replace the content revision table with a view.

Remaining tasks

  • Mulitlangual support see #77
  • "Strip HTML" filter/rewrite doesn't work on the log messages.
  • If we want to retain the yellowish rowstyle for the default revision, and the striped rowstyle in bartik, this might be solved in Twig or we could add a rowstyle plugin to views.
  • The dropbutton misalignment error, see #1890266: dropbutton text fails to retain .dropbutton-widget width

User interface changes

Before


After

API changes

N/A

Data model changes

N/A

Release notes snippet

WIP

Orignial Report

This depends on #1863898: Add test coverage for Views revision link handlers and #1826604: Add a dropbutton field handler to Views

This is one of the only content listings without it's own custom hook_ENTITY_operations().

CommentFileSizeAuthor
#113 replace-content-revision-table-with-view-1863906-113.patch10.94 KBhmdnawaz
#104 interdiff_101-104.txt3.31 KBvsujeetkumar
#104 1863906-104.patch36.11 KBvsujeetkumar
#101 1863906-101.patch35.74 KBryan.gibson
#97 interdiff_95-97.txt743 bytesraman.b
#97 1863906-97.patch36.22 KBraman.b
#95 interdiff_94-95.txt1.23 KBraman.b
#95 1863906-95.patch36.22 KBraman.b
#94 interdiff_90-94.txt1.04 KBraman.b
#94 1863906-94.patch36.15 KBraman.b
#90 1863906-90.patch35.91 KBHardik_Patel_12
#88 1863906_88.patch36.92 KBvsujeetkumar
#88 interdiff_86-88.txt3.24 KBvsujeetkumar
#86 1863906_86.patch37.58 KBvsujeetkumar
#81 screenshot-127.0.0.1-2019.07.17-16-20-06.png457.16 KBjibran
#81 screenshot-127.0.0.1-2019.07.17-16-19-32.png595.99 KBjibran
#80 1863906-80.patch35.95 KBjibran
#80 interdiff-db66fd.txt6.14 KBjibran
#75 node_revisions-75 after.png61.2 KBPancho
#75 node_revisions-75 before.png54.69 KBPancho
#74 1863906_72-74_interdiff.txt1 KBPancho
#74 node_revisions_view_1863906_74.patch34.02 KBPancho
#72 1863906_71-72_interdiff.txt7.73 KBPancho
#72 node_revisions_view_1863906_72.patch33.95 KBPancho
#71 1863906_62-71.interdiff.txt9.85 KBPancho
#71 1863906_69-71.interdiff.txt22.21 KBPancho
#71 node_revisions_view_1863906-71.patch30.65 KBPancho
#69 1863906_65-69_interdiff.txt475 bytesPancho
#69 node_revisions_view_1863906_69.patch50.7 KBPancho
#68 1863906_67-68_interdiff.txt719 bytesPancho
#68 node_revisions_view_1863906_68.patch50.87 KBPancho
#67 1863906_65-67_interdiff.txt478 bytesPancho
#67 node_revisions_view_1863906_67.patch50.71 KBPancho
#66 1863906_61-65.interdiff.txt23.43 KBPancho
#65 node_revisions_view_1863906--65.patch50.11 KBPancho
#62 node_revisions_view_1863906-61.patch26.95 KBPancho
#61 node_revisions after.png68.4 KBPancho
#61 node_revisions before.png57.22 KBPancho
#54 1863906-54.patch26.91 KBManuel Garcia
#54 interdiff-1863906-52-54.txt613 bytesManuel Garcia
#52 1863906-52.patch26.68 KBManuel Garcia
#52 interdiff-1863906-45-52.txt2.35 KBManuel Garcia
#45 revision-view-1863906-45.patch25.47 KBarchnode
#41 interdiff-1863906-39-41.txt1.93 KBdagmar
#41 1863906-revision-view-41.patch26.34 KBdagmar
#39 interdiff-1863906-37-39.txt1.6 KBdagmar
#39 1863906-revision-view-39.patch25.62 KBdagmar
#37 1863906-revision-view-37.patch24.94 KBdagmar
#32 1863906-revision-view-61.patch25 KBdagmar
#27 log-message.png54.86 KBkim.pepper
#27 interdiff.txt5.17 KBkim.pepper
#27 1863906-revision-view-27.patch30.33 KBkim.pepper
#23 revisions-view.png48.7 KBkim.pepper
#23 1863906-revision-view-only.patch18.46 KBkim.pepper
#23 1863906-revision-view-full.patch25.68 KBkim.pepper
#10 1863906-replace_content_revisions-10.patch23.89 KBpcambra
#8 vdc-1863906-8.patch12.3 KBtim.plunkett
#4 vdc-1863906-4-HACK.patch26.52 KBtim.plunkett
#1 vdc-1863906-1.patch24.57 KBtim.plunkett
#1 vdc-1863906-1-withoutdropbutton-do-not-test.patch10.34 KBtim.plunkett
#1 vdc-1863906-1-WITH-A-HACK.patch25.98 KBtim.plunkett
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

Assigned: Unassigned » tim.plunkett
Status: Active » Needs review
FileSize
25.98 KB
10.34 KB
24.57 KB
tim.plunkett’s picture

Issue tags: +VDC

Status: Needs review » Needs work

The last submitted patch, vdc-1863906-1-WITH-A-HACK.patch, failed testing.

tim.plunkett’s picture

Status: Needs work » Needs review
FileSize
26.52 KB

Status: Needs review » Needs work

The last submitted patch, vdc-1863906-4-HACK.patch, failed testing.

xjm’s picture

tim.plunkett’s picture

tim.plunkett’s picture

FileSize
12.3 KB

Rerolled for dropbutton, still hacky and blocked.

larowlan’s picture

Also we have a diff library in core, would be nice to get a diff in a modal for the body field. Probably out of scope.

pcambra’s picture

Assigned: Unassigned » pcambra
FileSize
23.89 KB

Here's a re-roll of this, still needs quite some work.

Also opened #2032977: Add views support for the missing columns of node_field_revision as a follow up of this one as we've lost some properties in views at some point.

pcambra’s picture

Need to check also #1863898: Add test coverage for Views revision link handlers as the revision links seems to be being fixed there

dawehner’s picture

+++ b/core/modules/node/node.moduleundefined
@@ -1351,16 +1351,6 @@ function node_menu() {
-  $items['node/%node/revisions'] = array(
-    'title' => 'Revisions',
-    'page callback' => 'node_revision_overview',
-    'page arguments' => array(1),
-    'access callback' => '_node_revision_access',
-    'access arguments' => array(1),
-    'weight' => 20,
-    'type' => MENU_LOCAL_TASK,
-    'file' => 'node.pages.inc',
-  );

I really hope that noone complains about the missing revision UI when views is not installed.

+++ b/core/modules/node/node.pages.incundefined
index 1fa8689..bf44f7f 100644
--- a/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php

--- a/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.phpundefined

+++ b/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.phpundefined
+++ b/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.phpundefined
@@ -32,6 +32,7 @@ class DefaultViewsTest extends ViewTestBase {

@@ -32,6 +32,7 @@ class DefaultViewsTest extends ViewTestBase {
     'backlinks' => array(1),
     'taxonomy_term' => array(1),
     'glossary' => array('all'),
+    'content_revisions' => array(1),
   );
 

We could also add node_field_revisions to HandlerAll test. In general I don't think have to add the view here as we have a good test coverage provided by node module anyway.

Pancho’s picture

I really hope that noone complains about the missing revision UI when views is not installed.

Given that content is anyway pretty much unmanageable without Views now, I think that doesn't add much on top.

However, Views module shouldn't say "Create customized lists and queries from your database." as description. It should mention being needed for system views, too. Created #2037783: Make module description for Views reflect its importance to cover that aspect.

Pancho’s picture

Status: Needs work » Needs review

Let's test #10 to see how close we are.

Regarding the missing revision UI without Views:

Given that content is anyway pretty much unmanageable without Views now, I think that doesn't add much on top.

was a bit overstating. We should probably have some basic fallback here, too.

Status: Needs review » Needs work

The last submitted patch, 1863906-replace_content_revisions-10.patch, failed testing.

dawehner’s picture

Mh I have to admit that sort of, because there is no other way to find the revisions of a node.
This is difficult to discuss.

pcambra’s picture

Status: Needs work » Postponed

Agreed, we need to provide a fallback for the node revisions.

I'm marking this "blocked" by #1863898: Add test coverage for Views revision link handlers & #2032977: Add views support for the missing columns of node_field_revision

xjm’s picture

Issue summary: View changes
Issue tags: +beta target
xjm’s picture

Priority: Normal » Major
mgifford’s picture

Assigned: pcambra » Unassigned

Just unassigning issues that haven't been developed for a bit in the D8 queue.

mgifford’s picture

jibran’s picture

Version: 8.0.x-dev » 8.1.x-dev
Status: Postponed » Active

Apparently #1863898: Add test coverage for Views revision link handlers got fixed in #2322949: Implement generic entity link view field handlers and from #1863898-87: Add test coverage for Views revision link handlers onward that was a test only patch. Turns out this has been unpostpone for last seven months.

I think starting form the scratch is a good idea here but this is belongs to 8.1.x now.

kim.pepper’s picture

Starting from scratch, this creates a view with a 'View' button, instead of linking the revision date to view the revision.

Also, doesn't show the current revision, as this will need a plugin.

This depends upon #2630886: Correct the join from revision data table to revision base table so i included it in 1863906-revision-view-full.patch

Screenshot of views revisions table

The last submitted patch, 23: 1863906-revision-view-full.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 23: 1863906-revision-view-only.patch, failed testing.

jibran’s picture

Thanks @kim.pepper. I think we need an update hook to enable the view and an update path test to test it as well.

instead of linking the revision date to view the revision.

I think we should keep this as is for UX point of view.

kim.pepper’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
30.33 KB
5.17 KB
54.86 KB

This adds a Revision Log column, to keep feature parity with the existing list, and fixes a couple of test fails.

Content revision table with logs

Added the upgrade path and test.

However, still getting a fatal:

Fatal error: Call to a member function isDefaultRevision() on a non-object in /vagrant/app/core/modules/node/src/Plugin/views/field/RevisionLink.php on line 30

Status: Needs review » Needs work

The last submitted patch, 27: 1863906-revision-view-27.patch, failed testing.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

xjm’s picture

Issue tags: -beta target

This issue was marked as a beta target for the 8.0.x beta, but is not applicable as an 8.1.x beta target, so untagging.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dagmar’s picture

Status: Needs work » Needs review
FileSize
25 KB

Here is a new version of the patch using the same view provided in #27 plus some changes.

Since I'm also working on the #2015149: Replace dblog recent log entries with a view which also introduces a new view, the hook_update_N was replaced by a node.post_update.php file as was recommended there.

Also, I fixed one of the two errors that #27 exposes. The one related to Views.Drupal\views\Tests\DefaultViewsTest.

Added the upgrade path and test.

However, still getting a fatal:

Fatal error: Call to a member function isDefaultRevision() on a non-object in /vagrant/app/core/modules/node/src/Plugin/views/field/RevisionLink.php on line 30

Regarding this fatal, the cause is: When a revision is deleted, the views cache stills sees the deleted revision entity as a row but with a null value. You can replicate this by installing the patch, deleting a revision and trying visiting the revisions list again. You will see the same fatal error. But if you clear the cache, the fatal error vanish.

The fix to this problem could be related to cache invalidation tags, but I'm not sure if drupal core already has an example of this for in other view. As far I know, the cache for the view should be updated based on updates of the node.

dagmar’s picture

Created #2841504: Cache tags for content revisions and contextual filters to track the issue with the cache tags.

Status: Needs review » Needs work

The last submitted patch, 32: 1863906-revision-view-61.patch, failed testing.

dagmar’s picture

Status: Needs work » Postponed

So, it resulted that this is not a cache issue.

The problem here is the node_revisions view is using as base table node_field_revision which keeps older revisions even if they are deleted.

See this two issues:

#2818053: Entries in revision_data_table are not deleted when entity revisions are deleted
#2753971: ContentEntityStorageBase::deleteRevision() function does not remove node_field_revision entries

Fixing the problem on the other tickets will automatically fix the last error of this one.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dagmar’s picture

Status: Postponed » Needs review
FileSize
24.94 KB

Status: Needs review » Needs work

The last submitted patch, 37: 1863906-revision-view-37.patch, failed testing.

dagmar’s picture

Status: Needs work » Needs review
FileSize
25.62 KB
1.6 KB

Status: Needs review » Needs work

The last submitted patch, 39: 1863906-revision-view-39.patch, failed testing.

dagmar’s picture

Status: Needs work » Needs review
FileSize
26.34 KB
1.93 KB

Some extra progress. There is now a tests that enables views and run the same tests for revisions with and without views.

Status: Needs review » Needs work

The last submitted patch, 41: 1863906-revision-view-41.patch, failed testing.

jibran’s picture

Nice work @dagmar all we need is a green patch now.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

archnode’s picture

Rerolled above patch. Applies to 8.4.x and 8.5.x.

kim.pepper’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 45: revision-view-1863906-45.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

matsbla’s picture

Manuel Garcia’s picture

Status: Needs work » Needs review

It's been a while, lets see where we stand with tests (patch still applies cleanly).

dawehner’s picture

One question we could evaluate in the issue summary: Are we okay with the potential problem of modules like diff start to maybe have issues, as we are using a view now?

Manuel Garcia’s picture

Fixing some failing tests. NodeRevisionsViewsTest still needs to be looked into.

Status: Needs review » Needs work

The last submitted patch, 52: 1863906-52.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Manuel Garcia’s picture

Status: Needs work » Needs review
FileSize
613 bytes
26.91 KB

This should fix MigrateUpgrade6Test

Status: Needs review » Needs work

The last submitted patch, 54: 1863906-54.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Manuel Garcia’s picture

Regarding the last failing test, the problem is that the view in the patch requires the view all revisions permission, whereas the test tries to access the revisions page with a user with just the view page revisions permission, and thus you get a permission denied page, and the test fails.

However this is highlighting a fundamental problem with what this issue is trying to do (tests++):

Currently the node/%/revisions page requires the user to either have 'view all revisions' or 'view $type_id revisions' permission (see NodeRevisionAccessCheck::checkAccess()).

So unless we figure out how to configure the view to require a user permission that depends on what node type you're trying to access, I don't think we can do this (without getting rid of per node type view revisions permissions, which is not going to happen).

To my knowledge this is not currently possible... which is a bummer because its a blocker for this issue :(

Berdir’s picture

Views access thingies are plugins, so technically, it's not very hard to create a custom access plugin that can figure that out I think. Only problem with that is that this access option (e.g. "Access revisions page for this content") will then *always* be an available option to site builders when deciding how to control access to a view.

AaronMcHale’s picture

Perhaps my comment on #2350939: Implement a generic revision UI (comment 57) could solve the problem mention in #56 and #57 in this issue.

By using a Block instead and having the routing logic handled by the Entiy Type then you can probably overcome the more complex access control issue and possibly other issues that might arrise.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jibran’s picture

Pancho’s picture

Let's start with before/after screenshots and a proper reroll against 8.7-dev after some tests were renamed.

Before:
node_revisions listing before

After:
node_revisions listing before

I like the separate column for the log messages and that it consumes less vertical space now.
However,

  1. We are now always showing the initial author of the node in the "Revision" column. Previously we showed the author of the actual revision, and that clearly made more sense.
  2. There is no visual hint anymore signaling the current revision.
  3. In a content moderation workflow, draft revisions used to have an operation named "Set as current revision" instead of "Revert", though the link goes to the same '/revisions/%revision/revert' path.
  4. Then there is this minor placeholder problem.

Re the visual hint aspect:

  • I personally always disliked the yellowish color, but it's definitely better than no visual hint. Also the phrase "Current revision" was replaced by a single "View" dropbutton, which is visually more appealing but adds to the problem.
  • I initially also liked the fact that "View" is now the default operation rather than "revert." However, in an editorial setting, "Set as current revision" for drafts might be the dominant task. Additionally, the primary operations set apart drafts from current revision as well as from older revisions. We therefore might want to restore the old primary operations.
  • If we have some other visual hint in place, we may keep the column redesign and the single "View" dropbutton for the current revision.
Pancho’s picture

Status: Needs work » Needs review
FileSize
26.95 KB

And here's the plain reroll of #54.

Status: Needs review » Needs work

The last submitted patch, 62: node_revisions_view_1863906-61.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

matsbla’s picture

I tested #62 and looks like a good improvement for me! However it does not work with content translation enabled, after I add a translation I get this error:

Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("arg_0") to generate a URL for route "view.content_revisions.page_1". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 182 of /home/d02hw/www/core/lib/Drupal/Core/Routing/UrlGenerator.php).

I think also the content revision view need to be filtered to the current language, maybe using contextual filter from URL?

Pancho’s picture

  • Switched author field - we need the revision author.
  • Changed RevisionLinkRevert link handler to print "Revert" for past and "Set as current revision" for forward ("draft") revisions.
Pancho’s picture

FileSize
23.43 KB

And here's the missing interdiff. Surprising how many tests are failing, but we'll get them tracked down.

Pancho’s picture

Pancho’s picture

Pancho’s picture

Sorry for the noise. There we should go, finally.

Manuel Garcia’s picture

Status: Needs work » Needs review
Pancho’s picture

Again, sorry for the noise. The view basically worked as it was properly exported, but there was something severely wrong with the YML.
Run a few local tests and hope now that we're finally back to three or four fails as in #62.
Ignore everything between #65 and #69, please.

Pancho’s picture

While you never know, there should actually only be one remaining failure that is related to [#2831499].

Remaining deprecation notices (20)
The revision_user revision metadata key is not set for entity type: block_content See: https://www.drupal.org/node/2831499
The revision_created revision metadata key is not set for entity type: block_content See: https://www.drupal.org/node/2831499
The revision_log_message revision metadata key is not set for entity type: block_content See: https://www.drupal.org/node/2831499
The revision_user revision metadata key is not set for entity type: node See: https://www.drupal.org/node/2831499
The revision_created revision metadata key is not set for entity type: node See: https://www.drupal.org/node/2831499
The revision_log_message revision metadata key is not set for entity type: node See: https://www.drupal.org/node/2831499
...

I'm unsure why these deprecation notices are shown. Before running the version update from NodeRevisionsViewsUpdateTest, the codebase should be up to date, so I don't why the metadata keys are not set.

At least I updated the test to Drupal\FunctionalTests\Update\UpdatePathTestBase, fixed and simplified some other things.

amateescu’s picture

I'm unsure why these deprecation notices are shown. Before running the version update from NodeRevisionsViewsUpdateTest, the codebase should be up to date, so I don't why the metadata keys are not set.

@Pancho, update path tests must be in the legacy group, see https://www.drupal.org/node/2985785

Pancho’s picture

Thank you so much, @amateescu!
With your help this might finally, for the first time in this issue, go green...
I'm hopeful enough to set it to "Needs review."

Pancho’s picture

And here are some new screenshots:

Before:
before

After:
after

  • Don't know why the "Strip HTML" filter/rewrite doesn't work on the log messages. That's something we still have to solve.
  • If we want to retain the yellowish rowstyle for the default revision, and the striped rowstyle in bartik, this might be solved in Twig or we could add a rowstyle plugin to views.
  • For the dropbutton misalignment error, see #1890266: dropbutton text fails to retain .dropbutton-widget width.

Status: Needs review » Needs work

The last submitted patch, 74: node_revisions_view_1863906_74.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jigarius’s picture

I was trying this patch on a bilingual site and I found each revision to be displayed twice.

Pancho’s picture

Thanks for testing and reporting. Next week I should find some time to research and fix this and other bugs.

Feel free to step in though...

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jibran’s picture

Addressed #26.

Don't know why the "Strip HTML" filter/rewrite doesn't work on the log messages. That's something we still have to solve.

Revsion log field is \Drupal\Core\Field\Plugin\Field\FieldType\StringLongItem it doesn't allow tags so stripping them also doesn't make sense.

Updated revision view page breadcrumb.
Update page display name.

jibran’s picture

Updated IS with screenshots.

Status: Needs review » Needs work

The last submitted patch, 80: 1863906-80.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

anavarre’s picture

@jibran - Things look great with the new view. One thing I've noticed though is there's an encoding issue when the pagination kicks in. See Next › Last pageLast » in your screenshot. I applied the patch to try this myself and can confirm I also had the encoding issue.

Looks related to:

+++ b/core/modules/node/config/optional/views.view.content_revisions.yml
@@ -0,0 +1,791 @@
+          tags:
+            previous: '‹ Previous'
+            next: 'Next ›'
+            first: '« First'
+            last: 'Last »'

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

michaellander’s picture

Thanks for all your work on this! Can we make the 'current revision' revert-able? If you have additional drafts ahead of the current revision, and decide you want to create a new draft based on what's current, you'd have to delete all revisions ahead of the 'current revision'. We allow both future and past revisions to be copied to latest, but we ignore current.

I've outlined an example use case here: #2350939-85: Implement a generic revision UI.

There's also another thread that covers the labeling that might be considered #2899719: Revision/version language on revision listing page is misleading with content moderation enabled.

vsujeetkumar’s picture

Status: Needs work » Needs review
FileSize
37.58 KB

Re-roll patch for 8.9 created.

Status: Needs review » Needs work

The last submitted patch, 86: 1863906_86.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

vsujeetkumar’s picture

Status: Needs work » Needs review
FileSize
3.24 KB
36.92 KB

More test fixes.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Hardik_Patel_12’s picture

Re-rolling patch against 9.1.x-dev , kindly review a patch.

Status: Needs review » Needs work

The last submitted patch, 90: 1863906-90.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

ryan.gibson’s picture

Patch from 90 applies cleanly to 8.9.3 as well. Thanks!

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

raman.b’s picture

Status: Needs work » Needs review
FileSize
36.15 KB
1.04 KB

Re-rolling for latest dev branch and resolving failed test cases

raman.b’s picture

The last submitted patch, 94: 1863906-94.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

raman.b’s picture

volkswagenchick’s picture

Adding NorthAmerica2021 and Easy Out of the Box tags for visibility.
DrupalCon NA is April 12-16 with a focus on EOOTB on Wednesday, April 14.
Thanks

ryan.gibson’s picture

I experience the same behavior as in #64. After a cache clear or two, it stops misbehaving. Going to guess something's up within the view.

ryan.gibson’s picture

Status: Needs review » Needs work

Patch from #90 applies, but is malformed on 9.1.6.

ryan.gibson’s picture

Status: Needs work » Needs review
FileSize
35.74 KB

Reroll from #90 for 9.1.x.

Status: Needs review » Needs work

The last submitted patch, 101: 1863906-101.patch, failed testing. View results

AaronMcHale’s picture

Queued patch in #101 for testing against 9.2.x, as generally speaking development on core features should be done against the latest branch.

vsujeetkumar’s picture

Status: Needs work » Needs review
FileSize
36.11 KB
3.31 KB

Fixed tests for 9.1.x, Please have a look.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

joachim’s picture

I think #2350939: Implement a generic revision UI makes this a wontfix.

As much as making this with a view is nice in some ways, we need a generic UI for revisions that works on all entity types. I don't see how we can do that with a View.

Also, we need the revisions table to be alterable by other modules (#2612222: Provide a better way to alter entity revision overview) such as Content Moderation (#3212602: [PP-?] Show revision state on the revisions overview tab for moderated nodes/entities).

jibran’s picture

We can have his as well as generic revision UI just like admin/content has both view and fallback. With we an always add/alter views field plugin to alter the page.

joachim’s picture

I think that's going to lead do bad UX, and exactly the opposite of this issue's 'Easy Out of the Box' tag!

Scenario:

1. user installs Drupal
2. node revisions are a view
3. user enables Content Moderation module
4. The revision status column doesn't show on the revisions page, because the view is overriding the alteration done using #2612222: Provide a better way to alter entity revision overview.
5. User needs to either:
-- a. understand the concept of 'a view at the same path overrides the route controller content' and know to delete the view, or
-- b. know how to edit the view to add the revisions status themselves

mstrelan’s picture

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

hmdnawaz’s picture

smustgrave’s picture

Status: Needs review » Needs work

Also wondering if this is needed now that #2350939: Implement a generic revision UI landed.

smustgrave’s picture

Status: Needs work » Postponed (maintainer needs more info)
AaronMcHale’s picture

Title: Replace content revision table with a view » [PP-1] Replace content revision table with a view
Status: Postponed (maintainer needs more info) » Postponed
Related issues: +#3153559: [PP1] Switch Node revision UI to generic UI

While #2350939: Implement a generic revision UI is committed, it doesn't impact this issue because Node is still using the same UI, that will change in #3153559: [PP1] Switch Node revision UI to generic UI.

I would suggest that we postpone this issue on #3153559: [PP1] Switch Node revision UI to generic UI as it doesn't make sense to do anything more here until that issue is done, and then evaluate where things are at.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.