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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stevector’s picture

Status: Active » Needs review
FileSize
46.24 KB

This depends on a state machine patch that is on the way.

stevector’s picture

Title: Fix broke view » Fix broken view
robeano’s picture

Test 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

robeano’s picture

Status: Needs review » Reviewed & tested by the community

http://drupal.org/node/1966920#comment-7307350 passed!

This patch looks good to me. Code review and testing completed.

stevector’s picture

Status: Reviewed & tested by the community » Fixed
stevector’s picture

Status: Fixed » Active
FileSize
4.97 KB

I 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.

stevector’s picture

Status: Active » Needs review

I've posted the dependent patch back in http://drupal.org/node/1966920#comment-7310214

robeano’s picture

Status: Needs review » Needs work

Interestingly, 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:

[18-Apr-2013 08:56:32 America/Chicago] PHP 32. DrupalTestCase->errorHandler($severity = 8192, $message = 'Call-time pass-by-reference has been deprecated', $file = '/stor/sandboxes/barre/wbm/www/sites/all/modules/state_machine/modules/state_flow_entity/includes/views/state_flow_entity_handler_field_state_flow_states_history_list.inc', $line = 29, array ('type' => 'class', 'name' => 'state_flow_entity_handler_field_state_flow_states_history_list', 'lookup_cache' => array (...), 'cache_update_needed' => TRUE, 'cache_key' => 'cstate_flow_entity_handler_field_state_flow_states_history_list', 'file' => 'sites/all/modules/state_machine/modules/state_flow_entity/includes/views/state_flow_entity_handler_field_state_flow_states_history_list.inc')) /stor/sandboxes/barre/wbm/www/modules/simpletest/drupal_web_test_case.php:0

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:

    // Call the parent pre_render method on general principle.
    parent::pre_render(&$values);

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.

stevector’s picture

Hmm, 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

robeano’s picture

Status: Needs work » Reviewed & tested by the community

That looks good to me. Feel free to commit the patches.

stevector’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.