Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The workbench moderation view provided by 2.x is totally broken. Here's a patch that takes the 1.x version of the view and swaps out the 1.x Workbench Moderation handlers for state machine handlers since so much of the dependency here is on state machine 3.x.
I'll post a patch shortly and cross reference a needed state machine patch.
Comment | File | Size | Author |
---|---|---|---|
#6 | dup-check--1966908-6.patch | 4.97 KB | stevector |
#1 | view-fix-1966908-1.patch | 46.24 KB | stevector |
Comments
Comment #1
stevectorThis depends on a state machine patch that is on the way.
Comment #2
stevectorThis patch depends on this State Machine patch: #1966920: Views integration fixes to accomodate the workbench moderation view.
Comment #3
robeano CreditAttribution: robeano commentedTest results are shown in the sister issue: http://drupal.org/node/1966920#comment-7302772
This patch may be good to go or may need more work. Waiting to hear back from @stevevector
Comment #4
robeano CreditAttribution: robeano commentedhttp://drupal.org/node/1966920#comment-7307350 passed!
This patch looks good to me. Code review and testing completed.
Comment #5
stevectorThanks robeano!
http://drupalcode.org/project/workbench_moderation.git/commit/ed933972c2...
Comment #6
stevectorI should have known this would need a test. I'm getting duplicate records because the join to {state_flow_states} is being made through {node_revision} and not {state_flow_history} Here's a fix (with a test), though it'll again depend on a corresponding change in state machine. Which I'll post shortly.
Comment #7
stevectorI've posted the dependent patch back in http://drupal.org/node/1966920#comment-7310214
Comment #8
robeano CreditAttribution: robeano commentedInterestingly, this test fails for me even though I was able to manually test the dependent patch at http://drupal.org/node/1966920#comment-7310214
The error simpletest shows:
On line 29 of wbm/www/sites/all/modules/state_machine/modules/state_flow_entity/includes/views/state_flow_entity_handler_field_state_flow_states_history_list.inc:
When I remove the ampersand from the pre_render call, the test passes.
I applied the dup-check patch on state_machine by checking out from git and using git apply. The patch applied cleanly. If these tests pass for you, then maybe we should discuss a bit? Let me know.
Comment #9
stevectorHmm, I don't think that handler is used on this View. In any case. Here's a pass-by-ref fix: #1973878: Fix call-time pass-by-reference in state_flow_entity_handler_field_state_flow_states_history_list.inc
Comment #10
robeano CreditAttribution: robeano commentedThat looks good to me. Feel free to commit the patches.
Comment #11
stevectorhttp://drupalcode.org/project/workbench_moderation.git/commit/7b36364972...