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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rudolfbyker’s picture

Assigned: Unassigned » rudolfbyker
Issue summary: View changes
Status: Active » Needs review
FileSize
583 bytes

Agreed. Here is a patch. Please review and comment whether it works.

axe312’s picture

Fixed and pushed. Thx!

  • axe312 committed 98ee8b5 on 7.x-1.x
    Issue #2118077 by fmr | cppcpp: Fixed Entity title tokens that are not...
axe312’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.