Filefield 6.x-3.2
Filefield Paths 6.x-1.3
File Aliases 6.x-1.0

Everything is set up to use an alias. In fact the alias is created, but when using generic files as the display formatter it doesn't use the alias in the link. I am using a custom node.tpl.php. I've searched through the available variables using the contemplate module in order to create the custom node template. I went back to check again and I see this as the filepath variable.

$node->field_page_download[0]['filepath']
    downloads/Apache Folder Junk_0.txt 

but you generally use the 'view' variable to display with the correct formatter.

$node->field_page_download[0]['view']
    <div class="filefield-file clear-block"><div class="filefield-icon field-icon-text-plain"><img class="field-icon-text-plain" alt="text/plain icon" src="http://mysite/sites/all/modules/filefield/icons/protocons/16x16/mimetypes/text-plain.png" /></div><a href="http://mysite/sites/mysite/files/downloads/Apache Folder Junk_0.txt" type="text/plain; length=110">Apache Folder Junk.txt</a></div> 

It also is using the filefield_formatter_default as the theme function. Any more information can be provided.

CommentFileSizeAuthor
#5 download_content_type.txt3.45 KBjdwfly

Comments

deciphered’s picture

I'm thinking that this is possibly related to your other issue, #677532: User warning: Duplicate entry - Uploading duplicate files throws warning.
My guess is that due to the duplicate entry in the database the alias for the file in question has not been created and therefore can't be displayed. While the alias you would expect may exist, it'd be a different version of the file, attached to another node.

That's all a guess, but a good one.
The fix for your other issue will be in the next development build, which should be out at the next build cycle (roughly 10 hours from this reply).

Once that code is in place you should be able to simply run 'Retroactive Updates' on the FileField in question and it should fix all the problems.

If you're desperate for the fix in the mean time, reply in either issue and I'll post the code for you.

Cheers,
Deciphered.

jdwfly’s picture

I am going to try this on a fresh install and see if I can get it to work or if the error still happens. Thanks for the quick reply.

deciphered’s picture

Status: Active » Fixed

jdwfly,

The latest development version of File Aliases contains the aforementioned fix, I would suggest updating to that version and running a Retroactive Update and everything should be fine.

Marking as fixed, feel free to re-open if issue persists.

Cheers,
Deciphered.

jdwfly’s picture

Status: Fixed » Active

Negative, the fix from the other issue does not fix this issue.

jdwfly’s picture

StatusFileSize
new3.45 KB

I can reproduce this on a new site with custom content type only one filefield. I've attached an exported definition of the content type I am using. I am using the latest dev of this module.

Either I am missing something huge in the settings or this is not working?

mark.’s picture

Yeah, I've had this problem for a while. Url's are being created and are listed on the admin "Url aliases" page. Perhaps I'm not understanding what this module is supposed to do:

1. On a node (full page view, not teaser) where the display settings are set to show "image linked to file", is this module supposed to link to the image file with the url alias?

2. Repeating the steps above, but changing display settings to "imagecache_name_100px_by_100px linked to file", is this module supposed to link to the file with the url alias?

deciphered’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

The Drupal 6 version of this module will not be receiving any more support.