When adding a token as the first parameter in the File Alias settings I get the drupal "page not found" error when attempting to serve that file at the URL alias, although it does display the file when viewing the file at sites/default/files/[alias-path]
Example:
When adding this to the File Alias settings pdf-files/[node:field-category:url:relative]/[file:ffp-name-only-original].[file:ffp-extension-original]
I am able to view files that were added to the following file path pdf-files/[node:field-category:url:relative]
. However when attempting this [node:field-category:url:relative]/[file:ffp-name-only-original].[file:ffp-extension-original]
to access the files inside this file path [node:field-category:url:relative]
I get a drupal "page not found" error although I am certain the file exists since when accessing the file with the full url structure it works sites/default/files/[alias-path]
Comment | File | Size | Author |
---|---|---|---|
#4 | file-alias-url-path-tokens-clean-urls-2621402.patch | 760 bytes | hershey.k |
Comments
Comment #2
Deciphered CreditAttribution: Deciphered commentedI ran a quick test using [node:nid]/[node:title].[file:ffp-extension-original] as my alias path, and it worked as expected.
It's possible there is something else in play here. Can you please give me steps on how to reproduce this on a fresh Drupal site, ideally using http://simplytest.me so I can test on the same environment?
Comment #3
Deciphered CreditAttribution: Deciphered commentedI believe this is a duplicate of #2620140: File Alias only works when matches exact File Path directory structure
Comment #4
hershey.k CreditAttribution: hershey.k commented@Deciphered I apologize for the delayed response. I have as well found a similar fix that I believe you have implemented in #2620140: File Alias only works when matches exact File Path directory structure which fixed this issue and the others I posted around the same time. Below are the other issues which are related that the patch fixed.
I had created a patch for myself at the time, but it seems like you beat me to it to posting it back on line. I am not too familiar yet on the process of posting patches back on to D.O but attached is the patch I had created. It seems that your patch in #2620140: File Alias only works when matches exact File Path directory structure has more changes and I'm sure there is a good reason for that. I'm just sharing what worked for me! Thanks for your quick responses!