Title: Errors in debug mode
Last modified: June 15, 2017

---

# Errors in debug mode

 *  Resolved [kierancalv](https://wordpress.org/support/users/kierancalv/)
 * (@kierancalv)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/)
 * Hi
 * Thanks for the new version of this great plugin.
 * The colour palette ability is really great! I have connected it to my redux options
   page. I have included the code in my functions.php to add the palette and it 
   works perfectly.
 * However: The below errors show in debug mode and make the plugin unusable in 
   Debug Mode.
 * Notice: Undefined index: hide_palette in ………./wp-content/plugins/acf-rgba-color-
   picker/fields/acf-rgba-color-picker-v5.php on line 138
 * Notice: Undefined index: color_palette in ……../wp-content/plugins/acf-rgba-color-
   picker/fields/acf-rgba-color-picker-v5.php on line 141
 * I tried checking isset() on the vars but it broke the pallet.
 * Thanks
 * Kieran
    -  This topic was modified 8 years, 12 months ago by [kierancalv](https://wordpress.org/support/users/kierancalv/).

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

 *  Plugin Author [dreihochzwo](https://wordpress.org/support/users/tmconnect/)
 * (@tmconnect)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/#post-9236184)
 * Did you add anything to the acf-rgba-color-picker-v5.php, because the vars `hide_palette`
   and `color_palette` are called a few lines earlier.
 * Could you please add `print_r($field);` as the first call to the `render_field(
   $field )` function, to check if the field contains the vars.
 * Did you get the “Color Palette” and “Hide Color Palette” options in the field
   editor?
 * Cheers, Thomas
 *  Plugin Author [dreihochzwo](https://wordpress.org/support/users/tmconnect/)
 * (@tmconnect)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/#post-9618942)
 * Looks like the problem did not exists anymore…
 *  Thread Starter [kierancalv](https://wordpress.org/support/users/kierancalv/)
 * (@kierancalv)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/#post-9865487)
 * Hi Thanks for your help.
 * i just noticed that the problem still exists however as the ‘hide_palette’ and‘
   color_palette’ are not added to the field at this point. I have not edited the
   plugin
 * I am using Multisite and the fields are inside a flexible content block.
 * Here is the print_r as first call to the render_field( $field ) function:
 * Array
    ( [ID] => 0 [key] => MY_VALUE [label] => Block Background Colour [name]
   => acf[MY_VALUE][0][MY_VALUE] [prefix] => acf[MY_VALUE][0] [type] => extended-
   color-picker [value] => #f1f2f2 [menu_order] => 115 [instructions] => [required]
   => 0 [id] => MY_VALUE [class] => [conditional_logic] => 0 [parent] => ______ [
   wrapper] => Array ( [width] => 50 [class] => MY_VALUE [id] => )
 *  [_name] => MY_VALUE
    [_prepare] => 1 [_valid] => 1 [parent_layout] => MY_VALUE[
   default_value] => )
 * Notice: Undefined index: hide_palette in ……./plugins/acf-rgba-color-picker/fields/
   acf-rgba-color-picker-v5.php on line 142
 *  Plugin Author [dreihochzwo](https://wordpress.org/support/users/tmconnect/)
 * (@tmconnect)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/#post-9865568)
 * Could you please post the code from your functions.php where you included the
   code to add the palette.
 *  Thread Starter [kierancalv](https://wordpress.org/support/users/kierancalv/)
 * (@kierancalv)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/#post-9865672)
 * Sure here you go:
 * /* ACF RGBA Color Picker – Add Color Palette
    ————————————————————– */
 *  add_filter(‘acf/rgba_color_picker/palette’, ‘my_functionname’);
 *  function my_functionname() {
 *  foreach($REDUX_OPTION [‘color_palette’] as $color) {
 *  if($color) $palette[]= $color;
 *  }
 *  return $palette;
    }
 *  Plugin Author [dreihochzwo](https://wordpress.org/support/users/tmconnect/)
 * (@tmconnect)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/#post-9865713)
 * That’s looking perfect – but maybe there’s something wrong with the returned 
   $palette.
 * Please add a `print_r($palette);` into the acf-rgba-color-picker-v5.php after
   the `$palettes = apply_filters( "acf/rgba_color_picker/palette", true );` and
   let me know what do get there.
 *  Plugin Author [dreihochzwo](https://wordpress.org/support/users/tmconnect/)
 * (@tmconnect)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/#post-9865720)
 * Sorry, it must be `print_r($palettes);` !!!
 *  Thread Starter [kierancalv](https://wordpress.org/support/users/kierancalv/)
 * (@kierancalv)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/#post-9865774)
 * Here you go:
 * Array
    ( [0] => #fff [1] => #ddd [2] => #000 )
 * Notice: Undefined index: hide_palette in ……./wp-content/plugins/acf-rgba-color-
   picker/fields/acf-rgba-color-picker-v5.php on line 142
 *  Plugin Author [dreihochzwo](https://wordpress.org/support/users/tmconnect/)
 * (@tmconnect)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/#post-9865873)
 * O.k. – that’s perfect, too.
 * It’s strange, that you didn’t get the “hide_palette” and “color_palette” in the
   fields array.
 * For me the plugin works correct and I get the correct fields array…
 * Did you get the “Color Palette” and “Hide Color Palette” fields in the field 
   editor?
 * Maybe ACF didn’t save the field settings correctly. Try to save the field group
   again and check the fields array.
 * If this didn’t solve the problem, please try to add a new RGBA Color Picker field
   into the Flexible Content and check if this field get the correct fields array.
 *  Thread Starter [kierancalv](https://wordpress.org/support/users/kierancalv/)
 * (@kierancalv)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/#post-9866034)
 * Hi thanks for the update.
 * This is now resolved
 * I had included the Field with PHP and I did not have the “Color Palette” and “
   Hide Color Palette” keys in the array as I edited a basic color picker to change
   it to your plugin for the flexible content field.
 * Once I added the fields to the array it works perfectly and errors are gone.
 * Sorry i should have spotted that sooner 🙂
 * Thanks for the great plugin 🙂
 * Kieran
 *  Plugin Author [dreihochzwo](https://wordpress.org/support/users/tmconnect/)
 * (@tmconnect)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/#post-9866096)
 * Great, that you have found the cause.
 * Sometimes it’s sooo easy 😉

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

The topic ‘Errors in debug mode’ is closed to new replies.

 * ![](https://ps.w.org/acf-rgba-color-picker/assets/icon-256x256.png?rev=1618186)
 * [ACF RGBA Color Picker](https://wordpress.org/plugins/acf-rgba-color-picker/)
 * [Support Threads](https://wordpress.org/support/plugin/acf-rgba-color-picker/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-rgba-color-picker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-rgba-color-picker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-rgba-color-picker/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [dreihochzwo](https://wordpress.org/support/users/tmconnect/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-18/#post-9866096)
 * Status: resolved