Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
system.module
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
7 Mar 2007 at 17:39 UTC
Updated:
27 Mar 2007 at 13:48 UTC
Jump to comment: Most recent file
Comments
Comment #1
chx commentedComment #2
hunmonk commentednote that this needs to be applied to Drupal 5 as well
Comment #3
dries commentedCan we add a code comment for that?
Comment #4
hunmonk commentedattached patch adds the necessary code notation.
Comment #5
dries commentedPatch seems to work, however, I'm left wondering if this is the best configuration/workflow. The alternative is to explicitly enable duplication checking on a handful of forms. Most forms already do duplication checking as part of their validate hook. So maybe the solution is to explicitly turn on duplication checking for comments and node forms, and leave most of the other forms untouched? Same with the search module, is it not allowed to search the same keyword twice?
I'd love to discuss this some more ...
Comment #6
robertdouglass commentedI believe this is the right workflow and it is according to how we designed the original patch.
Dries' example with the search form is not the right concept. You'd never load a specific instance of a search form and want to submit it more than once (by clicking the Search button twice before waiting for the page to load). Loading multiple instances of the search form, each of which get used to search for the same keyword... that's allowed and the duplicate checking shouldn't prevent it.
Comment #7
m3avrck commentedI concur.
This patch seems reasonable to me and should be applied to HEAD and 5.x (since form dup is in 5 as well). Searching is not broken as Robert points out.
Explicitly enable this checking on forms seems backwards--those that do that in validate can remove code and simplify things. If they need duplicates, for whatever reason, they can turn it off.
Comment #8
robertdouglass commented"maybe the solution is to explicitly turn on duplication checking for comments and node forms"
I think the default of including the duplicate check on every form unless otherwise specified is correct. This is a feature that all forms want by nature (even the confirm form, really), and very few will want to go around the check. Going around it for the confirm form is a hack to sidestep a limitation in the original patch. It is an acceptable hack, but the real fix would be to find the right way to do the duplicate check so that even the confirm form works correctly.
Comment #9
hunmonk commentedthe only way around that hack for the confirm form is to have a truely unique form value, which we don't have. options would be:
Comment #10
robertdouglass commented@hunmonk: I agree that going back and finding a way to remove the need for this issue is warranted. Buth this patch should go in and we should open a different issue for that, I think. I still see this patch as RTBC and the right way forward from this point.
Comment #11
BioALIEN commentedI agree with #7 and #8. This is probably frowned upon, but what about committing the patch to 5.x and then going back and eliminating the need for the patch in 6.x?
Comment #12
dries commentedI've committed this to CVS HEAD and DRUPAL-5. Thanks for the additional feedback.
Comment #13
(not verified) commented