I am using a clear Drupal 5.7 installation with 4 contributed modules - Upload path, Image, Pathauto and Token. My pattern for all kinds of content in Upload path looks like [yyyy]/[mm]/[dd]/[title-raw]. When I am posting a sample story with the title "Sample story" and one file attached to it, Upload path creates a literally the following path in my files folder: [yyyy]/[mm]/[dd]/sample-story/sample_file.jpg. Is it a Token problem? Or an Upload path bug? How to fix it?
The other question (it may be linked with above reported issue) is that when I select a sample_file.jpg from my hard disk and click Attach button, upload progress bar freezes. Though file uploads fine when I click Submit button.
Comments
Comment #1
yan commentedSubscribing.
The problem is that token module needs $node->created (the creation time and date of a node) to replace the tokens [yyyy], [mm], and [dd]. When you create a new node, $node->created is empty, i.e. the tokens can't be replaced.
The problem can be solved by adding the following to your /modules/token/token_node.inc befor line 21 (which says "if (isset($node->created)) {"):
I asked to add this to token_node.inc permantly, but the token maintainers argued that this is rather an upload path issue. So here we are. Could this problem be solved in upload path?
Comment #2
davidwhthomas commentedComment #3
yan commentedWhy is this issue closed, has the problem been solved?
Comment #4
davidwhthomas commentedyes, fixed in D6 version, or use the misc bugfix setting in the D5 version.