Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you goto node/add/story
attach a file, set the list state to off.
It will still list the file after the initial submit.
Its a one liner.
Comment | File | Size | Author |
---|---|---|---|
#9 | upload.module_30.patch | 1.64 KB | dopry |
upload.module_29.patch | 746 bytes | dopry | |
Comments
Comment #1
Junyor CreditAttribution: Junyor commentedDoesn't work. Now, uploads can never be listed.
Comment #2
dopry CreditAttribution: dopry commentedumm are you sure... I just did a clean cvs co out head... patch applied cleanly.
1) post with list enabled worked properly
a) updates worked properly
2) post with list disabled worked properly
b) updates worked properly
3) post with multiple attachments some list enabled, some not list enabled worked properly
b) updates worked properly
Are you working with or without js?
Comment #3
UncleD CreditAttribution: UncleD commentedI'm not sure I see a problem with CVS head. When I attach a file and select for it not to be listed, it doesn't show up and this is prior to applying your patch. I cant seem to produce the problem.
Comment #4
Junyor CreditAttribution: Junyor commentedTry changing list *after* the node has been submitted.
Comment #5
pfaocleI can reproduce this on beta2 and HEAD, and Junyor, that is not a solution, that is the problem dopry has raised.
I will try the patch at some point, once I've finished wrestling with these damn resizable text-areas. >:|
Comment #6
pfaoclePatch works great, at least for beta2.
Comment #7
Junyor CreditAttribution: Junyor commentedI wasn't posting a solution, I was posting about how to reproduce a bug with this patch. Let me be more verbose:
Reproduction:
1) Submit a node with the list attribute of a file disabled
2) Edit the node
3) Enable list attribute of the file
4) Submit the node
Expected result:
1) The file should now be listed when viewing the node
2) The list attribute should be checked when the node is edited
Actual result:
1) The file is not listed when viewing the node
2) The list attribute is not checked when the node is edited
The problem also appears if the list attribute was initially enabled and you try to disable it.
In other words, with this patch, it's impossible to change the list attribute after the node has been submitted.
Comment #8
Junyor CreditAttribution: Junyor commentedIt looks like that's a problem when creating new revisions. With revisions disabled, this patch works as advertised. Note that the problem I'm seeing happens without this patch too. Thus, this patch fixes a bug, though other bugs exist.
Comment #9
dopry CreditAttribution: dopry commentedJunyor pointed out the revision issue, and the other query I needed to patch...
Tested it, so here it is all rolled together against HEAD.
Comment #10
Junyor CreditAttribution: Junyor commentedTested with and without revisions. Works as advertised.
Comment #11
Dries CreditAttribution: Dries commentedCommitted to HEAD. Thanks.
Comment #12
(not verified) CreditAttribution: commented