Steps to reproduce:
Create a rules component "action set" define first parameter as "list of node items".
My component creates a node, loops through the list and updates entityreference-field value in list-item to be the node created.
All of the above works, but notice as below is thrown afterwards:
Notice: Undefined variable: account in views_bulk_operations_direct_process() (line 1167 of /home/.../public_html/.../sites/all/modules/views_bulk_operations/views_bulk_operations.module).
I'm using the latest dev version of the module. I Also noted that in views this "list type" of component is missing the recently committed " Skip permission step" checkbox.
I tried with component that takes "any entity"(single entity) as parameter and does the same as described above >> all works perfectly, no notices.
I would use this approach but if user selects more than one item from list, the component creates the new node multiple times, and every time reference to this most recently created node... Result would be 1-1, 2-2, 3-3, 4-4... Not 1-1, 1-2, 1-3, 1-4...
Comment | File | Size | Author |
---|---|---|---|
#7 | vbo_missing_account_decl-2473889-7.patch | 901 bytes | m.stenta |
#2 | vbo_missing_account_decl_2473889_2_D7.patch | 1.05 KB | CvW |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedSolution to this seems to be a defined variable :D
Who knew...
Add:
Below
In:
views_bulk_operations.module
Comment #2
CvW CreditAttribution: CvW as a volunteer commentedSince $account is only used once, and $user not, it is easier to replace $account by $user in _views_bulk_operations_entity_access.
Comment #3
kevineinarsson CreditAttribution: kevineinarsson at Websystem for ComplianceOnline Ltd commentedReviewed but please in the future make patches relative to the module folder
Comment #5
joelpittetThank you for the patch and the review. I've committed and pushed this to the dev branch.
Comment #7
m.stentaAttached is a patch made relative to the module folder - for anyone who needs to apply it via Drush Make while we wait for the next release of VBO.
Thanks @CvW for the fix!
Leaving this as closed...