Hello the community and the maintainers,
Hope there is no other related issue, though I searched a bit already ;-)
I encountered an issue while using vbo with workflow on a field collection (not sure it is related to the field collection thing anyway...), to modify the entity value on the workflow field. It appears the transitions were not displayed the way they were supposed to. I fist though about a workflow-related issue. But, digging further the issue, it appears transitions were not retrieved because the entity id of the field collection were never set correctly on this specific instruction, on actions/modify.action.inc, function views_bulk_operations_modify_action_form on line 202:

$entity = entity_create($context['entity_type'], $default_values);

The entity id is never set in my case. Maybe it is written this way by design. I just want to be sure if there is a reason why it's not written this way instead :

    $entity = entity_load_single($context['entity_type'], reset($form_state['selection']));

Indeed, we do have the identifier information in the variable $form_state['selection']. It could even be done by leaving the previous instruction and assigning the key directly.

What do you think ? It should stay as is, 'cause it is the right design ?
Thanks for your help.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

raphael waeselynck created an issue. See original summary.

raphael waeselynck’s picture

Here is a patch implementing my solution... If it is acceptable :)

joelpittet’s picture

Version: 7.x-3.3 » 7.x-3.x-dev
Issue tags: -entity +Needs steps to reproduce

Could you put together the minimum steps to reproduce this bug so that I can run/step through?

Thanks for the patch @raphael waeselynck

raphael waeselynck’s picture

Version: 7.x-3.x-dev » 7.x-3.3

hello @joelpittet
I have a workflow on one content type, another workflow on one field_collection entity. It seems to produce some mess-up between workflows (already raised another issue about that here : )
Then I have a view with views bulk operation module wich allow to make the workflow proceed on the field collection. On the second step, workflows states are right only for the admin role (they are all displayed, actually), but they are not proposed for another role wich should access specific states regarding its role.
Hope it is clear enough...

joelpittet’s picture

You set it back to 3.3, can you make sure it's not fixed in 3.x-dev please so I don't do needless work tracking this down. All development is done against the -dev branch.

raphael waeselynck’s picture

Sorry, my mistake, it was set back to 7.x-3.3 by default, don't know why... I check that asap,' cause I'm really using workflow with entities and I start to gather many patch to apply on my project, too ^^

joelpittet’s picture

Status: Active » Fixed

We can re-open I just posted 3.4 so LMK if this is still a problem

Status: Fixed » Closed (fixed)

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