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.
After performing the pattern replacement for the entity title, any token for which no replacement value was generated should be removed from the pattern.
A simple fix for this would be just to replace line 236 of bulk_media_upload.upload.inc:
$label = token_replace($form_state['values']['title'], array($entity_type => $entity, 'file' => $file));
with:
$label = token_replace($form_state['values']['title'], array($entity_type => $entity, 'file' => $file), array('clear' => TRUE));
see the documentation of token_replace here.
Comment | File | Size | Author |
---|---|---|---|
#1 | bulk_media_upload-token_bugfix-2118077-1.git_.patch | 583 bytes | rudolfbyker |
Comments
Comment #1
rudolfbykerAgreed. Here is a patch. Please review and comment whether it works.
Comment #2
axe312 CreditAttribution: axe312 commentedFixed and pushed. Thx!
Comment #4
axe312 CreditAttribution: axe312 commented