Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Causes an integrity constraint violation. Should be an error, but error should occur more gracefully.
Comment | File | Size | Author |
---|---|---|---|
#22 | 2498595-22.patch | 1.07 KB | AohRveTPV |
#19 | 2498595-19.patch | 1.07 KB | NancyDru |
#14 | 2498595-14.patch | 1.07 KB | NancyDru |
#12 | 2498595-12.patch | 1.07 KB | NancyDru |
#6 | 2498595-6.patch | 1012 bytes | AohRveTPV |
Comments
Comment #1
AohRveTPV CreditAttribution: AohRveTPV commentedComment #2
NancyDruWill this do?
Comment #4
NancyDruI don't really understand tests.
Comment #5
AohRveTPV CreditAttribution: AohRveTPV commentedTestbot could not apply your patch. It looks to me like the problem is the patch file does not have a newline character at the end of the last line in the file. I'm not sure how that happens. Vim indicated this with "[noeol]". Resaving seemed to fix.
By the way, it looks like line 17 of the patch adds a trailing space.
Thanks for the patch.
Comment #6
AohRveTPV CreditAttribution: AohRveTPV commentedFixed aforementioned newline problem and removed trailing space.
Comment #8
NancyDrui don't see why that patch would fail on expiration.
Comment #9
AohRveTPV CreditAttribution: AohRveTPV commentedRunning tests locally you can get a snapshot of the page after each request. That should be elucidating. Am running the tests locally now.
Comment #10
AohRveTPV CreditAttribution: AohRveTPV commentedThe problem with the code in the patch: If you edit and save an existing policy, you get "Duplicate policy name."
To reproduce: Create a new policy, save, then edit, and re-save.
The test failed because it just happens to edit an existing policy as part of the test, which causes the "Duplicate policy name."
Comment #11
NancyDruOkay, back to the drawing board...
Comment #12
NancyDruTry it again.
Comment #14
NancyDruaarrgghh
Comment #16
NancyDruI give up.
Comment #17
AohRveTPV CreditAttribution: AohRveTPV commentedSame problem as in #2: no newline character at end of last line in patch file. Are you producing your patches using Git? The following should work:
git diff >foo.patch
Comment #18
NancyDruYes, that's what I'm doing, but there are other patches applied, so they are all stuck together and I have to try to pull them apart.
Comment #19
NancyDruI pulled a fresh version.
Comment #20
AohRveTPV CreditAttribution: AohRveTPV commentedAre you familiar with
git add -p
? That is what I use most often for picking out some changes from many for a patch. You add selectively to the index from the working tree, thengit diff --staged >foo.patch
to diff the index versus HEAD. Maybe you already know about it, but I had been using Git for a while before I started using it.Comment #21
NancyDruNope, never ran into that one.
Comment #22
AohRveTPV CreditAttribution: AohRveTPV commentedLooks good to me. Two minor changes:
1. Remove hyphen from "case-sensitive". (I think the grammar rule is compound modifiers following the noun they modify do not get a hyphen.)
2. Change
$dup_name
to$dupe_name
to avoid abbreviation. ("dupe" is informal adjective meaning the same as duplicate per at least one dictionary.)It might be more conventional to solve this by having a human-readable name and a machine name--not sure. But this patch seems to fix the bug and that is most important.
The
return TRUE;
line in the validate function is pointless, I think, but it can be removed separately.Comment #24
AohRveTPV CreditAttribution: AohRveTPV commentedWent ahead and committed. Thanks for the fix!
The changes in #22 are not functional changes and can be fixed later if I have erred.
Comment #25
NancyDruThanks. Sorry I didn't get to it over the weekend.