-
Notifications
You must be signed in to change notification settings - Fork 8
Expose section views data to revisions #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 8.x-1.x
Are you sure you want to change the base?
Conversation
larowlan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me - need tests?
|
Yes. It also breaks if you apply it to Content Revisions, so I need to take some time to write smart tests for it -- though likely just working example Views. |
|
I played around with this a bunch, and I guess I'm confused about what tables we ought to be using. This filter breaks when used directly with a 'content revision'. If it 'gets the actual value from a content revision' it works fine. |
|
Had a need for this and looking around the issue queue led me here. @agentrickard thanks for getting the ball rolling. I adapted the code in the getViewsJoin() function as below which got this working for us. I am not sure how to open a PR on an already existing PR so attaching the updated function here. Please let me know your thoughts on this. |
|
Not sure what went wrong with the code formatting but the piece of code to note is the one in the code box :) |
|
Try using three backticks around the code elements. You can also run a PR by basing your fork off the |
|
aaaah 3 backticks works. thanks! TIL :) I've posted a patch here as I wasn't sure: https://www.drupal.org/project/workbench_access/issues/2979637#comment-12851737 |
This is a work-in-progress.
To my understanding, to make the Workbench Access filter work with Content Moderation, we have to be able to filter on content revisions. This starts that work, but the logic in
Drupal\workbench_access\Plugin\views\filter\Section::query()will need to be updated to account for the tables.