-
A while back, I reported an issue where it turned out that adding field keys with a dash instead of underscore broke the forms. Once I removed these and readded my fields with a keyname using an underscore, everything seemed fine. But now, going into role based fields tab the last 4 entries show a strange error (and they have the names of my badly named, deleted fields). The errors all look like this:
PHP12Warning: Illegal string offset 'label' in /home/xxx/xxx.xxx.com/wp-content/plugins/userpro/admin/panels/fieldroles.php on line 15t toc-ambassadorI am afraid to select or update the roles on this page in case it causes a problem. Can you tell me how to fix this?
Can I get some help please? If you need, I can send my purchase code again….
Can I get some help please? If you need, I can send my purchase code again….
I tried downloading my db and applying a serialization fix from here: https://github.com/Blogestudio/Fix-Serialization
BUT when I reuploaded my DB, all fields were gone from UserPro!! So I had to restore my backup and I am back to the problem above…Can you please suggest a fix that will not delete all of my painstakingly entered fields?
I was finally able to fix this myself, hopefully this will help someone else:
1. Originally, I kept trying to remove the bad data from the serialized string in the DB, but every time I did UserPro would revert to the default fields, erasing all my data, and I had to keep restoring my backup with the bad data.
2. The key to solving this was the a:xx number at the beginning of the field. Very important that the xx match the number of items in the serialized data, or it will all be lost. you can easily figure out this number by counting all your fields (including the errors) in the userpro admin under role based fields.
3. The field is in the options table, and it is called “userpro_fields”. Remove the offending data (I did it by editing the field in PHPmyadmin), make sure the number is correct, then save.
Like I said, hopefully this will help someone else, because good luck getting any support here.
You must be logged in to reply to this topic.