Several small bugs/typos prevent profile fields from being updated.

Comments

berdir’s picture

Uh, bad. I assume I broke that when converting to DBTNG.

Anyway, we should add a simple test to catch these bugs.

mfb’s picture

See also #479220: Finish up tests for Profile module. Should I add a test here or in that issue?

sivaji_ganesh_jojodae’s picture

Status: Needs review » Reviewed & tested by the community

This patch works fine

Before applying patch

    * The specified title is already in use.
    * The specified name is already in use.

After applying patch

The field has been updated.
dries’s picture

Status: Reviewed & tested by the community » Needs work

We should write a test for this!

mfb’s picture

Status: Needs work » Needs review
StatusFileSize
new4.73 KB

Added basic test for updating fields.

oneoftwo’s picture

Status: Needs review » Needs work

The 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...

oneoftwo’s picture

Status: Needs work » Needs review
StatusFileSize
new6.39 KB

Updated the profile.test section for inclusion of date and select fields, and slightly altered function updateProfileField for simpler usage (at least IMO).

Status: Needs review » Needs work

The last submitted patch failed testing.

oneoftwo’s picture

StatusFileSize
new6.37 KB

whoops, small problem in patch creation, should be fixed now.

mfb’s picture

Status: Needs work » Needs review
StatusFileSize
new6.21 KB

OK I added the update test to select and date tests.

mfb’s picture

@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.

oneoftwo’s picture

Ah, 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...

Status: Needs review » Needs work

The last submitted patch failed testing.

jromine’s picture

Priority: Normal » Critical

In 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.

mfb’s picture

Status: Needs work » Needs review
StatusFileSize
new6.24 KB

Use 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.

coltrane’s picture

Status: Needs review » Reviewed & tested by the community

The patch still applies and corrects for update error and the tests pass on my install from HEAD today.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Looks good. Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.