Problem/Motivation
Since version 9.3.8 our site has exhibited strange behaviour in that when a user goes to the revisions tab of a node, regardless of how many revisions there are only the current revision is listed. I've tried it out on a clean install and the revisions list is fine, I've also disabled all of our custom modules and the revisions list is still broken.
It's not drupal core and it's not our custom code so I can only assume that it's a contributed module that may be hijacking the $node_storage->getQuery()
command. I can fix it by editing:
core/modules/node/src/Controller/NodeController.php
...but core is not where the problem is so a patch (attached) would not be my first choice. Has anyone else seen this behaviour and, if so, can it be fixed?
Steps to reproduce
Difficult to pin down what's causing it. It's clearly not core and it doesn't look like it's our custom modules. A list of contrib modules is attached, FWIW.
Proposed resolution
As you will see from the patch, \Drupal::entityTypeManager()->getStorage('node')->revisionIds($node)
will return all revisions whereas the original $node_storage->getQuery()
will only return the most recent revision. Again, I'm not proposing this as a patch for drupal core, it's just to illustrate where the problem lies.
Something is causing NodeInterfaceStorage getQuery()
to return only one revision while \Drupal::entityTypeManager()->getStorage('node')->revisionIds($node)
works as expected (cross-checked against the node_revision table in the database). Any insight would be much appreciated.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet