[node:field_file] does not work if a function is in the code, too

Created on 20 January 2014, about 11 years ago
Updated 5 January 2025, 3 months ago

I have a content type thats holds a file and some metadata belonging to it. on 'content auto label' i am offered the [node:field_fieldname]-token.
in this code it returns the uri:

$field_file = token_replace('[node:field_file]');

return $field_file;

in this code it returns a empty string:

$field_file = token_replace('[node:field_file]');

return $field_file;

function test() {
    
}

this behaviour is repoducible: always
affected versions: 7.x-1.2 and 7.x-1.x-dev

🐛 Bug report
Status

Closed: outdated

Version

1.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024