129 if (empty($path)) {
130 foreach (explode('/', file_directory_path()) as $dir) {
131 $path .= '../';
132 }
133 }
This code in file_aliases.module inserts multiple instances of ../ into the url. Obviously this is what it is meant to do but this means that on node pages when a Filefield is displayed the url generated can look like this ../../../example.pdf when the path it should be creating is example.pdf. There is no need to include these '../' as far as I can see?
Comments
Comment #1
sammo commentedOk It looks like the filefield module needs the path to be formatted in this way. However, it also needs the path to include the path to the site files directory. The '../' in the path then makes the path relative to the original site files directory, keeping the filefield module happy.
I changed the code to:
This fixed the issue
Comment #2
decipheredThe Drupal 6 version of this module will not be receiving any more support.