Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error calling pods_api()->save_pod_item() #187

Closed
pglewis opened this issue Jul 26, 2012 · 1 comment
Closed

Error calling pods_api()->save_pod_item() #187

pglewis opened this issue Jul 26, 2012 · 1 comment
Assignees
Milestone

Comments

@pglewis
Copy link
Contributor

pglewis commented Jul 26, 2012

Code:

$params = array(
    'pod' => 'person',
    'data' => array(
        'name' => 'Rick',
        'favorite_color' => 'Blue'
    )
);
$params = pods_sanitize($params);
$newPersonID = pods_api()->save_pod_item($params);

Messages:

Notice: Undefined index: required in /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/classes/PodsAPI.php on line 3078

Notice: Undefined index: unique in /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/classes/PodsAPI.php on line 3086

Notice: Undefined index: required in /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/classes/PodsAPI.php on line 3078

Notice: Undefined index: unique in /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/classes/PodsAPI.php on line 3086

Notice: Array to string conversion in /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/classes/PodsAPI.php on line 1557

Notice: Array to string conversion in /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/classes/PodsAPI.php on line 1557
WordPress database error: [Unknown column 'Array' in 'field list']
REPLACE INTO wp_pods_tbl_person (name,favorite_color) VALUES (Array,Array)

Fatal error: Uncaught exception 'Exception' with message 'Cannot add/save table row; SQL: REPLACE INTO wp_pods_tbl_person (name,favorite_color) VALUES (Array,Array); Response: Unknown column 'Array' in 'field list'' in /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/functions.php:59 Stack trace: #0 /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/classes/PodsData.php(742): pods_error('Cannot add/save...', true) #1 /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/functions.php(21): PodsData::query('REPLACE INTO w...', 'Cannot add/save...', NULL, NULL) #2 /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/classes/PodsAPI.php(1559): pods_query('REPLACE INTO@...', 'Cannot add/save...') #3 /usr/home/sundco/public_html/pods2.sundco.com/wp-content/themes/Test/index.php(70): PodsAPI->save_pod_item(Array) #4 /usr/home/sundco/public_html/pods2.sundco.com/wp-includes/template-loader.php(43): include('/usr/home/sundc... in /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/functions.php on line 59

@pglewis
Copy link
Contributor Author

pglewis commented Jul 26, 2012

New message with latest commit:

Notice: Array to string conversion in /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/classes/PodsAPI.php on line 1567

Notice: Array to string conversion in /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/classes/PodsAPI.php on line 1567
WordPress database error: [Unknown column 'Array' in 'field list']
REPLACE INTO wp_pods_tbl_person (name,favorite_color) VALUES (Array,Array)

Fatal error: Uncaught exception 'Exception' with message 'Cannot add/save table row; SQL: REPLACE INTO wp_pods_tbl_person (name,favorite_color) VALUES (Array,Array); Response: Unknown column 'Array' in 'field list'' in /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/functions.php:59 Stack trace: #0 /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/classes/PodsData.php(742): pods_error('Cannot add/save...', true) #1 /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/functions.php(21): PodsData::query('REPLACE INTO w...', 'Cannot add/save...', NULL, NULL) #2 /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/classes/PodsAPI.php(1571): pods_query('REPLACE INTO@...', 'Cannot add/save...') #3 /usr/home/sundco/public_html/pods2.sundco.com/wp-content/themes/Test/index.php(71): PodsAPI->save_pod_item(Array) #4 /usr/home/sundco/public_html/pods2.sundco.com/wp-includes/template-loader.php(43): include('/usr/home/sundc... in /usr/home/sundco/public_html/pods2.sundco.com/wp-content/plugins/pods2alpha/functions.php on line 59

sc0ttkclark added a commit that referenced this issue Jul 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants