Several small bugs/typos prevent profile fields from being updated.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | profile.patch | 6.24 KB | mfb |
| #11 | profile-update.patch | 6.21 KB | mfb |
| #10 | profileupdate_493520_9.patch | 6.37 KB | oneoftwo |
| #8 | profileupdate_493520_8.patch | 6.39 KB | oneoftwo |
| #5 | profile-update.patch | 4.73 KB | mfb |
Comments
Comment #1
berdirUh, bad. I assume I broke that when converting to DBTNG.
Anyway, we should add a simple test to catch these bugs.
Comment #2
mfbSee also #479220: Finish up tests for Profile module. Should I add a test here or in that issue?
Comment #3
sivaji_ganesh_jojodae commentedThis patch works fine
Before applying patch
After applying patch
Comment #4
dries commentedWe should write a test for this!
Comment #5
mfbAdded basic test for updating fields.
Comment #7
oneoftwo commentedThe patch addresses an important issue, so bump. It is also working quite well for me.
On the test module, however, currently only textfield, textarea, list, checkbox and url are tested - date and select are not included in the $field_types of ProfileTestFields...
Comment #8
oneoftwo commentedUpdated the profile.test section for inclusion of date and select fields, and slightly altered function updateProfileField for simpler usage (at least IMO).
Comment #10
oneoftwo commentedwhoops, small problem in patch creation, should be fixed now.
Comment #11
mfbOK I added the update test to select and date tests.
Comment #12
mfb@oneoftwo Oops obviously I was offline while re-rolling the patch and cross-posted.. Not sure we want to simplify the update function? It works similarly to the create function as I have it.
Comment #13
oneoftwo commentedAh, so you are still working on this too. Well, I went with the rewrite of the function to keep it more in line with the createProfileFields and to not have to write the $edit array every time the function is called. But obviously either version works.
Anyways, webchick just pointed me to #394720: Migrate profile module data to field API, so the patch (and much of profile.module) might very well be moot anyhow...
Comment #15
jromine commentedIn the patch of the update section, I don't think the 'type' field should be in the field list; at least it wasn't as of r1.24 of profile/profile.admin.inc (before the DB changes).
Sorry for duplicate #556230: Unable to edit profile field; I didn't find this issue when searching.
Comment #16
mfbUse the new admin/config/people/profile path.
@jromine: I'm pretty sure 'type' should be there because this line is also used for insert, not just update.
Comment #17
coltraneThe patch still applies and corrects for update error and the tests pass on my install from HEAD today.
Comment #18
webchickLooks good. Committed to HEAD. Thanks!