Insert take the URL before transliteration clean it
cels - October 22, 2009 - 09:26
| Project: | FileField Paths |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
With transliteration active, if I add a image with underscores (_) the transliteracion convert it to (-) on the imageupload (I want to clean all my fileuploads); plus, I have some tokens for the filepath.
In the preview take this URL: "files/the_image.jpg" (not important)
The URL in the img tag after save the node is:
"files/tokenforfiletype/tokenfornid/the_image.jpg"
BUT the correct URL is:
"files/tokenforfiletype/tokenfornid/the-image.jpg"
The problem: Insert take the URL before transliteration clean it?

#1
It sounds like whatever module is replacing "_" with "-" is not doing it soon enough, rather than Insert being too late. As you noticed, the preview image is also using the original name at "_", meaning that Insert is using the URL that Drupal knows about when it does the insert. There would be no way for it to know that underscores will be converted to hyphens on save.
I looked for an option for hyphens/underscores, but I don't think that is a feature of Transliteration at all, sounds like an issue caused by another module (likely FileField Paths).
#2
Based on my personal testing, this is not a FileField Paths module issue as FileField Paths will process Insert modules unprocessed paths without an issue (moreso in the upcoming dev, but sufficiently for this issue at this stage), but I'm willing to be proven wrong and/or investigate the issue before blaming someone elses module (sorry, must be one of those days).
Please provide reproduction steps, configuration options, enabled modules including version and any other relevant information so the issue and cause can be confirmed.
Cheers,
Deciphered.