Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
field system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Mar 2009 at 02:05 UTC
Updated:
17 May 2009 at 09:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
yched commentedHere's a hotfix patch. As I wrote above, this area needs serious refactoring, but we need to fix the current code first, at least to have something to compare against.
Comment #2
yched commentedAlso : If we had a test for the AHAH-'add more' button, which I've been willing to write for some time now, then it would have been the job of the offending patch to fix this :-p.
So, same fix as above, with a test for the AHAH behavior. It will also be useful to validate #367567: Use AJAX framework for "Add more" / load include file containing form / introduce $form_state['build_info'],
The test steals the code poll.test uses to test its own 'add more' button, and abstracts it to a separate _fieldPostAhah() method.
Not sure whether it's worth promoting to DrupalWebTestCase, I leave that out to more FAPI / test oriented people to decide - in a separate thread ?
The test also updates the regexp used in the existing 'non AHAH' test to a more specific one, to make it match the AHAH test.
Comment #3
karens commentedI found one more instance of '#programmed' on line 188 of field.form.inc that needs to be changed to 'programmed' to match the new API. Other than that the patch works fine. The bot doesn't like my patches, so I haven't re-rolled it myself, but if someone could add that fix in it should be good to go.
Comment #4
yched commentedRight, New patch with that last '#programmed' bit fixed.
Setting to RTBC based on Karen's feedback.
Comment #5
yched commented'Setting to RTBC', he said.
Comment #6
cburschkaI'm not sure, but this looks odd compared to other places where we do string concatenation. Shouldn't you do
'<input [^>]*value="' . $value . '" [^>]*'?However, this seems to still apply, and it's been sitting in the RTBC queue for a month, so I'm bumping it up.
Comment #7
yched commentedHm, I'm not sure I see why this wouldn't be correct ?
Comment #8
bjaspan commentedI don't think we have a ban on double-quoted string interpolation. Leaving as RTBC. Angie will let us know if it is a problem.
Comment #9
dries commentedI've committed this. We can continue to work on this if necessary. Thanks.