latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Custom fields caused loop error and admin…

Home Forums Community Forum Custom fields caused loop error and admin…

This topic contains 3 replies, has 2 voices. Last updated by  Cristián Lávaque 3 years, 9 months ago.

Topic Author Topic
Posted: Wednesday Apr 10th, 2013 at 5:52 pm #47116

Warning: Invalid argument supplied for foreach() in C:InetpubvhostsRATE-YOUR-CUSTOMER.COMhttpdocswp-contentpluginss2memberincludesclassescustom-reg-fields.inc.php on line 285

I added two custom fields and this is the error I received and now in the admin panel Registration/Profile Fields & Options won’t display the two custom fields I entered, I can’t add anymore, and I can’t delete them. I searched the database and I can’t find where this information is stored locally.. is it in a raw file or stored remotely?

I’m also receiving a global WP issue that add’s backslashes to everything in the database attempting to escape it… might this have caused an error when s2Member saved the data?

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Thursday Apr 11th, 2013 at 8:37 am #47181

I’m also receiving a global WP issue that add’s backslashes to everything in the database attempting to escape it… might this have caused an error when s2Member saved the data?

It may have.

I’d create a new tests installation of WP with just s2Member and create the two same fields to see if you can reproduce the problem like that. Knowledge Base » Common Troubleshooting Tips

If you can reproduce it in the clean installation, please submit your site’s info and tell us how to reproduce it with a step-by-step, please, so we can investigate it. s2Member® » Private Contact Form

I searched the database and I can’t find where this information is stored locally.

It’s most likely in a serialized array in the options table for the fields definitions, and the usermeta table for the user input. Search for s2, it’ll help find the rows related to s2Member.

Posted: Thursday Apr 11th, 2013 at 2:02 pm #47216

Alright thanks, I found where the information is stored. Now is there a way you can point me to where s2member is inserting my custom field values into the wp_usermeta table? I need it to enter these values also into the wp_users table because that’s where I had originally intended these values to go and had setup some of my code to pull data from there.

Posted: Friday Apr 12th, 2013 at 5:35 am #47283

Now is there a way you can point me to where s2member is inserting my custom field values into the wp_usermeta table?

I haven’t really checked, but am guessing s2member/includes/classes/custom-reg-fields.inc.php.

But rather than modifying how s2Member stores those, I think it’ll be simpler to modify your script to use s2Member’s default. These functions may help:

http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_s2member_custom_fields()
http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field()

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.