Hi,
I'm coming from FileField Paths' issues queue:
#542974: Cleaning FileField Path and Filename: single quotes are replaced by 039
I don't quite understand my issue and where should I ask for help, but here it goes:
When creating a FileField, I've checked in "File path cleanup settings" and "File name cleanup settings":
- Cleanup using Pathauto.
- Convert to lower case.
- Transliterate.The problem is that when filename contains a single quote ('), it is replaced by "039" when it should be replaced by Pathauto's separator (-).
Such problem doesn't occur when pathauto aliases node titles so I think it's only related to FileFields.
http://drupal.org/node/542974#comment-3249904
I changed from [title] to [title-raw] and it works now for the title. But I cannot find the token -raw for the filefield description, so when I put this, single quotes are replaced by 039:
[title-raw]-[filefield-description].[filefield-extension-original]Is there any -raw token for the description?
Or how to avoid 039 and other similar replacements?
http://drupal.org/node/542974#comment-3466606
Filefield Paths only takes care of paths and file names.
Your issue, which I also encounter, is certainly related to Imagefield Tokens.
Thank you
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | imagefield-tokens-special-characters-926966-7.patch | 776 bytes | sunfire-design |
Comments
Comment #1
pomliane commentedSame issue here.
Comment #2
pomliane commentedIf J0nathan and I are the only one having this issue it might not be the good queue...
Sorry, but I'm a bit lost between FileField, File(Field) Paths and ImageField Tokens potential involvement in this...
Could anyone please show the right direction? :)
Comment #3
13rac1 commentedIt has been a long time, have you corrected this issue?
Comment #4
pomliane commentedUnfortunately no, the problem remains.
Comment #5
13rac1 commentedComment #6
Sinan Erdem commentedComment #7
Sinan Erdem commentedSolved the special characters issue by adding these two lines:
just after those lines in imagefields_tokens.module file:
Sorry, too lazy to submit a patch...
Comment #8
Sinan Erdem commentedComment #9
13rac1 commentedOnly set "Needs review" when there is a patch available.
Comment #10
sunfire-design commentedChanges in #7 works great.
I attach a patch for the changes.
Comment #11
pomliane commentedVery simple solution working even for D6 with small changes.
The time it took to emerge raises questions: is this module really Actively maintained and Under active development?
Anyway thank you Sinan Erdem!
Comment #12
13rac1 commentedPatch (to be ported) is for when and existing patch has already been applied to a branch.
Pomliane, I know I haven't added much substance to this conversation, but this is as much time as I've got. I don't have an existing project using this module, so creating/debugging/testing/documenting it gets heavily delayed. I've got other projects, my job (where I fit in maintaining as much as reasonable), and try to have a life off the computer. There isn't enough time in my life to constantly work on all of these Drupal projects.
Thanks for figuring it out Sinan.
Thanks for the patch sunfire-design. I'll apply the changes, but I cannot directly apply the patch, because it you've used tabs instead of spaces. In the future, please make sure patches follow the Drupal coding standards.
Comment #13
pomliane commentedeosrei, I have strictly no issue with your involvement of course, how could I? :)
But, I think that, to be useful, maintenance/development statuses of your module should be updated accordingly... or, maybe, a co-maintainer could help you?
Comment #14
sunfire-design commentedSorry for the tabs.
New one attached.
Comment #15
Anonymous (not verified) commentedI was experiencing this problem with both quotes (') and ampersands (&) in my node titles. The patch from #14 fixed the issue for me (after re-saving all my nodes).
Comment #16
nodecode commented#14 fixed the issue for me too. It's super simple code. I also tested with a bunch of other special characters and it was great. +1 RTBC.
Comment #17
Anonymous (not verified) commentedBumped into the same issue and used the patch succesfull. Please commit.
Comment #18
northseattlewebmaster commentedI'm having the same issue trying to use an apostrophe in Drupal 6. Please help..
Comment #19
northseattlewebmaster commentedI'm having the same issue trying to use an apostrophe in Drupal 6. Please help..
Comment #20
millionleaves commentedThis patch does the trick, but won't apply if you've already applied the patch here (and vice versa): https://www.drupal.org/node/1889772#comment-10078632
I was able to manually add the two new lines from this patch to my version which included the above patch, and it solved my problem. Happy to post a new version of this patch which takes account of the above patch being applied first, but I don't want to confuse things.... I'll also add a comment to the other queue.
Comment #21
nwom commented#14 works great. Thanks!
Comment #22
ysamoylenko commentedComment #24
ysamoylenko commentedThe patch was committed. Thanks for your testing.
Comment #25
ram4nd commented