After I upgraded to the dev release it fixed the compatibility with fupload where you had to click retroactive update to organize the paths, but now the opposite happened. Using a regular image field or image crop doesn't work until you hit retroactive update. I only found out now I think the problem is with the token I'm using from a module called type local nid with token [lnid]. It seems to work fine with most other tokens I've tried. So assuming I have a path like "path/to/file/[lnid]" it will reach up to "path/to/file" and place it in that folder, but the lnid token is ignored. I believe using this token was still working fine in the stable release. The token also works for the image fupload widget so maybe this is something easy to fix? Thanks.

Comments

deciphered’s picture

Title: Imagefield and image crop stopped working with filefield path » FileField Paths issue with Type-local nids.
Component: Miscellaneous » Code

Hi Platinum,

Based on a quick google search and your own comments, I also agree that the [lnid] token is likely the cause:
#349524: lnid not available in presave hook
#486884: Type-local nids runs too late.

Looking into the issue now.

Cheers,
Deciphered.

deciphered’s picture

Status: Active » Fixed

Hi Platinum,

The issue was a weight issue, there are two options to fix the issue:
- Make FileField Paths heavier so it runs after Type-local nids.
- Make Type-local nids lighter so it runs before FileField Paths.

The way I see it, Type-local nids should be lighter because it is supposed to be offering a token, but as any module beginning with a letter < 't' with a weight of 0 won't receive this token it isn't really doing it's job.

I have submitted two patches to Local-type nids, which have to be applied in the following order:
#678386: Code cleanup
#486884: Type-local nids runs too late.

If you don't wish to apply the patches, another option would be to set the weight of the module manually, which would require making a database change. Simple enough if you have phpMyAdmin setup, just find the entry for 'type_local_nids' in the {system} table and change the weight to -1.

If neither of these options are appealing to you, you can add your two cents to the issues containing the patches to let the developer know that getting the patches committed is of high importance to you.

Hope this helps.

Cheers,
Deciphered.

Platinum’s picture

Thank you for the very quick solution. I just tried it and can confirm that it was a module weight issue. I only set the module weights directly from phpmyadmin and didn't apply the patches though.

deciphered’s picture

Status: Fixed » Closed (fixed)

Glad to hear it :)