751 posts
  • 6 Years of Membership
  • Affiliate Level 1
  • Collector Level 2
  • Exclusive Author
+1 more
CyberShot
says

I am working in the wordpress admin area. Everything is working and I am not getting any errors but when I press the save button on my form, the database does not get updated. How do you figure out why this is when you don’t get any error messages?

2627 posts Put a Donk On It
  • Weekly Top Seller
  • Elite Author
  • Exclusive Author
  • Featured Author
+11 more
ThemeProvince
says

I am working in the wordpress admin area. Everything is working and I am not getting any errors but when I press the save button on my form, the database does not get updated. How do you figure out why this is when you don’t get any error messages?

Open wp-config.php

Change WPDEBUG to true.

751 posts
  • 6 Years of Membership
  • Affiliate Level 1
  • Collector Level 2
  • Exclusive Author
+1 more
CyberShot
says

Thank you for that thePhoenix. That did show me what the problem was. but I have no idea what this error means.

Undefined index: update_slider_options

that is the name of my save button in a meta_box for a custom post type. Defined like so


<?php if ( $_POST['update_slider_options'] == 'true' ) { slider_options_update(); } ?>
<input name="update_slider_options" value="true" type="hidden" />
<input name="update_slider_options" class="button" value="Update Options" type="submit" />

do you have any idea?

2627 posts Put a Donk On It
  • Weekly Top Seller
  • Elite Author
  • Exclusive Author
  • Featured Author
+11 more
ThemeProvince
says

Some errors generated make no sense so I just disabled that feature. But I thought it might solve your thread’s issues.

422 posts plop
  • Weekly Top Seller
  • Elite Author
  • Author Level 7
  • 6 Years of Membership
+9 more
kimonothemes
says

Firebug + FirePHP

1149 posts
  • Affiliate Level 1
  • Author Level 3
  • Beta Tester
  • Collector Level 2
+3 more
fillerspace
says

Thank you for that thePhoenix. That did show me what the problem was. but I have no idea what this error means.

Undefined index: update_slider_options

That means that “update_slider_options” was not found in the $_POST array

Check these two things:

Is the form method POST ?

Also, you have two inputs with that name, the hidden one and the submit button.

Try print_r($_POST) to see the full array

751 posts
  • 6 Years of Membership
  • Affiliate Level 1
  • Collector Level 2
  • Exclusive Author
+1 more
CyberShot
says

I tried the print_r and all I got was Array(). I did check the code and both are there. now I am getting no errors, it still just isn’t updating the database

would you give my code a once over? it’s 127 lines

http://pastebin.com/GDp04xac

58 posts
  • 6 Years of Membership
  • Affiliate Level 3
  • Author Level 9
  • Collector Level 2
+6 more
DigitalCavalry
says

You need experience, experience and experience and var_dump function. :)

751 posts
  • 6 Years of Membership
  • Affiliate Level 1
  • Collector Level 2
  • Exclusive Author
+1 more
CyberShot
says

I am afraid I don’t understand your post. What are your trying to say?

1149 posts
  • Affiliate Level 1
  • Author Level 3
  • Beta Tester
  • Collector Level 2
+3 more
fillerspace
says

I added this:

slider_options_meta_box();

Right before the

add_action('admin_init', 'manager_init');

And I changed

function slider_options_meta_box($post) {

To

function slider_options_meta_box() {

And everything works for me

by
by
by
by
by
by