Closed (fixed)
Project:
Scald File Provider
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Jul 2015 at 18:50 UTC
Updated:
17 Jul 2015 at 08:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
web3h commentedIf it can help:
I tried to generate Thumbnails with VBO after import by activating the "generate_thumbnail" function in the Scald Atoms operations view, but no thumbnail is generated.
If I manually modify and save the atom, the thumbnail is generated. But I have hundreds.
The VBO solution would be fine for me...
Comment #2
nagy.balint commentedhmm yes, thumbnail will only be generated on presave. But that also means that if during import, the option is set like $atom->data['scald_thumbnail_default'] is not empty, then at the save it should generate the thumbnail. So maybe you can set this data just before you save the entity in the migration script?
Which module implements the "generate_thumbnail" function? I cant seem to find it in scald or scald_file.
Comment #3
web3h commentedSorry the exact name of the option is "scald_thumbnail_generation" in the scald_atoms_operations view.
In mass operations, it is not activated by default.
Comment #4
nagy.balint commentedI dont see such a string in scald either, maybe its provided by a 3rd party module, or its a generalization of something.
Comment #5
web3h commentedFound. The "scald_thumbnail_generation" is a Rules component someone else created, but it does nothing, just saving the atom and the thumbnail is not generated.
I am triying to set $atom->data['scald_thumbnail_default'] in the migration script, but without success.
How could I call the presave function in Views Bulk Operations ?
Comment #6
nagy.balint commentedDrupal should call that presave each time an atom is saved. So if you could the VBO to save the atoms with that setting, then it should work.
If such a thing is not possible, then I suppose that the provider could contain a VBO action that generates thumbnail for an atom, by setting this option and then saving the atom.
Comment #7
web3h commentedNo. It doesn't work il I try to Use VBO to save the entity. But it works if I save it manually ...
If you could add a VBO thumbnail (re)generation function to the provider it would be great.
Comment #8
nagy.balint commentedSo this is what I had in mind.
After applying this patch, clear Drupal cache and try the new action.
Comment #9
web3h commentedPerfect !
The patch is exactly what I needed.
Thank you very much. You saved my day this time again.
Comment #10
nagy.balint commentedThanks, Committed.