When editing a profile item, the current code tries to "exeucte" a query instead of executing it, and tries to pass form_build_id, op, and other fields to the profile fields. The patch fixes this.

Of course, as soon as flobruit's patch at #394720: Migrate profile module data to field API to kill profile module and migrate its data to fields goes into core, this won't be a problem anymore, but in the meantime, it can help.

Comments

Status: Needs review » Needs work

The last submitted patch failed testing.

fgm’s picture

Status: Needs work » Needs review
StatusFileSize
new1.09 KB

Rerolling.

jim0203’s picture

Applies fine, fixes typo in "execute", and strips out a load of junk that doesn't need to be passed to db_update. Pass.

catch’s picture

Status: Needs review » Needs work
   else {
+  	$values = $form_state['values'];
+  	unset($values['form_build_id'], $values['form_token'], $values['form_id'], $values['op'], $values['submit']);
     db_update('profile_field')

Indentation is off here, but otherwise rtbc.

fgm’s picture

Status: Needs work » Needs review
StatusFileSize
new1.14 KB

Rerolled agains today's HEAD.

fgm’s picture

StatusFileSize
new1.14 KB

Ah, there was a stray TAB :-(

gopherspidey’s picture

Issue tags: -Fields in Core

#6: profile_admin_4.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Fields in Core

The last submitted patch, profile_admin_4.patch, failed testing.

mr.baileys’s picture

Status: Needs work » Closed (duplicate)
Issue tags: -Fields in Core

Duplicate of – and fixed by – #493520: Profile fields cannot be updated