Fixed Custom user field with field id 0

PhillipJFry

New member
I created a custom user field and put 0 in the field id, now I can't edit or delete the field. If I click the field in the admin panel it takes me to Create new field, if I try to delete it, it gives error. "The requested field could not be found."

How may I delete the custom field? Is this a bug?
 
That's a bug so I have moved the thread (0 should likely be prevented from being used).

I suspect it may be necessary to manually edit the ID in the database.
 
It's going to be in the xf_user_field table - there will be a field_id column and one of the entries will have a value of 0.

Feel free to submit a ticket with ACP and phpMyAdmin and we can resolve it for you.
 
It's going to be in the xf_user_field table - there will be a field_id column and one of the entries will have a value of 0.

Feel free to submit a ticket with ACP and phpMyAdmin and we can resolve it for you.
I don't have phpMyAdmin but I resolved it myself and I think I didn't break anything.
 
The easiest option here is to block creation of a field with an ID of 0 (or anything "falsy"), so I've done that now.
 
Top Bottom