Closed (won't fix)
Project:
Prepopulate
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Aug 2006 at 20:24 UTC
Updated:
12 Mar 2008 at 15:35 UTC
I've noticed from print statement debugging that prepopulate is trying to alter all the forms on a page, e.g. ones such as search_theme_form, not just image_node_form, story_node_form etc. Although it's not been a problem for me so far, I imagine it could have unexpected consequences. In the attached patch, I'm therefore suggesting disallowing prepopulate by default.
| Comment | File | Size | Author |
|---|---|---|---|
| disallow-default.patch.txt | 1.28 KB | egfrith |
Comments
Comment #1
eafarris commentedThe problem I have with 'off by default' is that there's no UI for turning it on for forms that aren't node/add/$type, like admin/settings/site-information (for example). Not that this is necessarily a use case for this module, but things like that *are* possible and it's pretty cool.
I'm not going to 'wontfix' this just yet; let's discuss it. Can you give an example where this might be harmful, or have unexpected consequences?
Comment #2
egfrith commentedI agree that changing defaults is undesirable, and I take the point about limitiing the possibilities of using prepopulate.
I can't think offhand of an example where there might be harmful or unexpected consequences -- to do that I'd need to study fields of different forms specified in drupal to see how many fields share names. I'll try to have a look at this later.
I suppose that if there are unexpected consequences, these could be reduced by specifying the form name in the url, e.g. something like:
http://www.example.com/node/add/image?edit_form[image_node_form][title]=...
I think it wouldn't be too hard to add code to handle this.
However, this doesn't deal with potentially harmful consequences. However I guess as long as prepopulate is only changing or adding #default_value elements, nothing too bad should happen. And whether harmful things can happen is probably independent of the type of form that is altered anyway.
Comment #3
eafarris commentedIt's been a few months... any more thoughts on this? This patch would be the complete opposite of the patch at http://drupal.org/node/101916.
Comment #4
egfrith commentedI haven't had time seach exhaustively for possible name confilicts. Given the desire for prepopulate to be more general (see http://drupal.org/node/101916), and given that I haven't thought of any really bad things that changing the defaults would prevent, I'm happy for this bug to be closed.
Comment #5
add1sun commentedmarking won't fix since OP agrees.