Support » Plugin: Central Color Palette » Warning: Invalid argument supplied for foreach()

  • Resolved cadiz

    (@cadiz)


    Hi Daniel,

    I love your plugin, but I have the following problem. I made two WP installations. The first one is a bit older and has content, the second one is clean. On both WP I have this error message when I want to save something in your plugin. I have already deactivated all other plugins. Always the same error. See below.

    WP: 5.2.1
    Plugin: 1.13.9

    I replaced the path here with *my path*. I hope you can help me anyway.

    Best regards

    Warning: Invalid argument supplied for foreach() in /*my path*/plugins/kt-tinymce-color-grid/index.php on line 973

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/*my path*/plugins/kt-tinymce-color-grid/index.php:973) in /homepages/*my path*/wp-includes/pluggable.php on line 1251

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/*my path*/plugins/kt-tinymce-color-grid/index.php:973) in /homepages/*my path*/wp-includes/pluggable.php on line 1254

    • This topic was modified 1 year, 10 months ago by cadiz.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter cadiz

    (@cadiz)

    … I solved it. It happens when no color is stored yet. As soon as a color is saved, there is no error message. This means that settings are not saved until a color is selected. This behavior is very confusing. Can this be fixed?

    Plugin Author Daniel Menȝies

    (@kungtiger)

    Yeah, the palette is sent as an array and the saving routine expects one without checking. Settings are saved though but WordPress gets stuck because of that warning. Rather ugly programming on my side.
    Version 1.13.10 corrects this.

    Thread Starter cadiz

    (@cadiz)

    Unfortunately, there’s a new problem. When I wanted to change colors in Elementor or Customizer there was a mouse over so I could see the color names. That worked well. But now there is no mouse over anymore. I’m not sure, but I think this is since WordPress update from 5.2 to 5.2.1.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Warning: Invalid argument supplied for foreach()’ is closed to new replies.