I have a fairly simple content View using VBO that works fine when executed from its page display, but fails when executed from the shell via Drush. The View uses VBO to execute a simple Rule (which employs Conditional Rules, though this isn't necessary for the failure). For this example, I've arranged for one item to be returned by the View, and the Drush command behaves as follows:
$ drush vbo-execute set_plant_image_tags rules_component::rules_set_plant_image_tags
Queing items for "Set plant image tags" [ok]
Page with index: "0" was enqueued. [ok]
Queued 1 item for "Set plant image tags" [ok]
array_flip(): Can only flip STRING and INTEGER values! entity.inc:175 [warning]
array_flip(): Can only flip STRING and INTEGER values! entity.inc:388 [warning]
Processed 1 out of 1 [ok]
Performed "Set plant image tags" on 1 item. [ok]
While VBO says that the action was performed, it actually wasn't, presumably due to the array_flip() warnings. The same operation from the UI works as expected.
I've attached exports of both the View and the Rule. Anyone know what's causing this failure, and how to fix or work around it?
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | 2846885-19-drush-vbo.patch | 580 bytes | joelpittet |
| #3 | 2846885_feature_plant.tar_.gz | 10.54 KB | jerry |
| vbo_rule_export.txt.zip | 1.06 KB | jerry | |
| vbo_view_export.txt.zip | 1.85 KB | jerry |
Comments
Comment #2
joelpittetCan you provide me with a feature export of your content type because I can't seem to create 'plant' with the nessasary fields for that view to work.
Also, which version of entity api are you using?
Comment #3
jerry commentedAttached. Apologies for the size; it's used with Feeds and has rather a lot of fields.
7.x-1.8
Thanks for taking a look at this.
Comment #4
joelpittetThis looks like it has a bunch of dependencies which all could be the culprit... can you tell me the versions of flexslider, file_entity. I have a broken handler in the view so need to sort that out
Comment #5
jerry commentedFlex Slider 7.x-2.0-rc1+21-dev (2016-Aug-05)
File Entity (fieldable files) 7.x-2.0-beta3
Media 7.x-2.0-rc3
Comment #6
joelpittetThis handler on the view seems to be broken, I'm not sure why, maybe you can tell me? Could need a different dependency?
Comment #7
jerry commentedShould be the same as the alt text filter, but title text instead - i.e. "(File) File: Title Text (empty)"
Comment #8
joelpittetThis is what it's showing me

Comment #9
jerry commentedThis is what it should be:
Comment #10
joelpittetNot sure what I'm doing wrong, deleted and recreated the plant type and this is the import on the view failure to validate:
Comment #11
jerry commentedIf you look at the image file entity type fields, is field_file_image_title_text present?
I believe that it's supposed to be there by default, along with field_file_image_alt_text, for images only. So far as I know, File Entity provides that, though I suppose it's possible that Media is also involved.
Comment #12
joelpittetYes
field_file_image_title_textis there.Comment #13
jerry commentedDunno why the import isn't working, but perhaps you can just delete/re-create that filter. It's exactly like the alt text filter (checks for empty).
Comment #14
joelpittetFound it, I tried creating that field as an image before I installed the file_entity and it used that base field for the Image entity type.
Comment #15
joelpittetSomehow the rule export is no longer on this issue, can you re-attache both the view and the rule export please?
Comment #16
jerry commentedClick "Show 3 more files" at the bottom right of the file information list to see them.
Comment #17
joelpittetWhoa, I thought they were gone, usually that is up in the Issue Summary. Thanks.
Comment #18
joelpittetJust an FYI, you may want to set the max length of your botanical and common name to be less combined + the 3 characters than the title and alt fields or make those fields bigger because I ran into issues with the generated text fataling to store that large of values.
Also, mutliple values can be set on one field instead of field_1, field_2 etc.
Still on this
Comment #19
joelpittetOk try this patch, took a bit to track down as usual...
Comment #20
jerry commentedGood catch on the combined field name length; thanks.
Your patch is working fine for me. It eliminated the warnings and properly updated the file ALT tag field. Thanks for taking the time to chase it down; much appreciated!
Comment #22
joelpittetThanks @jerry for the help tracking this down. I've committed and pushed it to -dev.