Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Normally when the thumbnail field is updated the provider makes sure that the id is synced back to the base_id in the atom. This is done by implementing the update_atom hook. However on creation the system only calls the register_atom hook. So the image provider should implement both hooks and not just only the update, otherwise it is possible to break the atom at creation if the thumbnail image is replaced on the options form.
Comment | File | Size | Author |
---|---|---|---|
#1 | fix-thumbnail-update-on-create-1975438-1.patch | 1.04 KB | nagy.balint |
Comments
Comment #1
nagy.balint CreditAttribution: nagy.balint commentedPatch attached.
Comment #2
jcisio CreditAttribution: jcisio commentedThanks. I've committed a modified version http://drupalcode.org/project/scald.git/commit/abfde0e. It's a bit longer but it keeps the private function sane because the logic of $mode should not be there.