Conversation
larowlan
left a comment
There was a problem hiding this comment.
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.