Tokens do not work when filefield_paths module is enabled. Not even the non-filefield_paths tokens. If filefield_paths is not enabled, everything (ie. traditional tokens) works fine.

It is strange, because filefield_paths works with the Multiupload Filefield Widget module (http://drupal.org/sandbox/czigor/1115362).

Comments

vingborg’s picture

Thanks. I didn't test it with filefield_paths, so I didn't notice.

Did you do anything special to make MuFW work with filefield_paths?

czigor’s picture

No, it worked right away.

vingborg’s picture

I think it's because I use the 'plupload' form element instead of the 'managed_file' ditto (or the version you made). The latter probably embeds the token hooks or something to that effect.

I'll have to dig into it. Ideally the patch should go into the plupload form element, but maybe I can work something out.

Taxoman’s picture

Title: Filefield_path tokens » Filefield_path tokens not working with MUpload

(Subscribing)

vingborg’s picture

Assigned: Unassigned » vingborg
Anonymous’s picture

It's not just the filefield/imagefield path tokens that aren't working. The field settings like "Maximum image resolution" (which auto-scales images on upload) and "Maximum upload size" (per file) are also broken. I think it's because plupload/mupload skip the Drupal core file validation hooks.

Anonymous’s picture

Now here's something funny:

- if you first upload a series of files succesfully
- re-open (you see the normal imagess list with thumbs) and re-save the node
- then the Drupal validation hooks are run after all, even the filefields are processed (the files are now moved to the designated filefield paths)

This indicates that plupload/mupload forgets to run those core/filefield hooks after uploading the files. The solution is just to add an extra step between mupload and node_save, namely to run those hooks again.

sachbearbeiter’s picture

subscribe

Taxoman’s picture

@sachbearbeiter: check the green Follow button at the top right corner here; it is supposed to replace "subscribe" comments (new feature as of yesterday), ref. #1306444: Stop subscribing, start following:
"Stop subscribing, start following"
http://drupal.org/node/1306444

sachbearbeiter’s picture

yes - i read about it too late yesterday - no subscribe posts anymore - yuhuu :)

gmclelland’s picture

I thought the filefield_paths module is in a bad state right now? See http://drupal.org/node/1186080

sachbearbeiter’s picture