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.
If the File Destination Directory is using a token, like [node:title] and the value of the token has a & character in it, the directory that is created has & in the name.
Tokens return sanitized values. Looks like you need a decode_entities() around the token_replace call in file_entity_upload_destination_uri(). Similar to the issue #1987568: Alt and Title Text ". Patch forthcoming.
Comment | File | Size | Author |
---|---|---|---|
#1 | file_entity-destination-token-decode-2360043-1.patch | 512 bytes | mpotter |
Comments
Comment #1
mpotter CreditAttribution: mpotter commentedHere is the patch. Pretty simple one.
Comment #2
dehacker CreditAttribution: dehacker commentedThis patch works for my instance of OA 2.19. File directory names now use '&' instead of entity '&' when creating directories from file path upload tokens.
I also tested the & with space/section naming issue for select lists and the update in OA 2.19 and sites will need the patch that is expected in the next OA release (2.23?) to fix that apparently.
Comment #3
mpotter CreditAttribution: mpotter commentedComment #5
joseph.olstadComment #7
joseph.olstad