just wondering...if title is required as unique for all nodes, but pathauto is generating titles, does this run a check during save node before pathauto does its thing? i'm a bit confused...
also, for something like imagefield - if set for 'all nodes' will it simply check the appropriate folder and make sure that the filename does not already exist? i've already encountered something where i could use this: uploaded a bunch of screenshots all named 'screen.jpg' and some nodes are conjuring up the wrong one! i was thinking about a token for the folder/file name, but this would be way easier since it's less likely to happen on production use (meaning people uploading froma camera with a standard default are gonna get img234423.jpg anyways, so less likely to happen period)
Comments
Comment #1
arithmetric commentedzilla,
Thanks for your questions.
I wouldn't suggest using this module to require that the title is unique if you're using auto_nodetitle to generate the node's title. This module is based on notifying the user of a duplicate when the user previews or saves a new or existing node. By the time auto_nodetitle generates the title, it may be too late to warn the user. Also, if the title is generated from other fields, then it might make more sense to use this module to require that those fields are unique.
You can use this module to require that a filefield is unique, but I'm not sure it will have the effect you are suggesting. First, the filefield module determines whether an uploaded file will overwrite a pre-existing file with the same name, and this would happen before this module could prevent it. Second, this module identifies duplicates based on the values stored in the database by the field module. The filefield module saves a number of values, including the size, mime type, and path of the file, meaning that unless an uploaded file had identical values for all of these properties, it would not be considered a duplicate.
Hope this helps.
Comment #2
zilla commentedthank you for such a detailed explanation!
what's funny is that wiht some images in my admin account, i've been testing for dupes by putting screenshots on multiple nodes via imagefield/imagecache presets - all are named screen.jpg - and sometimes i've seen the wrong pic in the lightbox, or the wrong one on the node - but i'm only using jpg, gif, png types so did *not* install that mimetypes module - do you think that would remedy these isolated incidents? (versus this module, which sounds like it won't work in this scenario)