Title: PHP warning when creating empty group
Last modified: August 22, 2016

---

# PHP warning when creating empty group

 *  Resolved [Sciscitator](https://wordpress.org/support/users/sciscitator/)
 * (@sciscitator)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-when-creating-empty-group/)
 * Thanks for this great plugin.
 * I just like to indicate that the plugin throws an unpretty PHP warning when creating
   a group with no content:
 * Warning: Cannot modify header information – headers already sent by (output started
   at /Users/kraharvahar/Development/projects/migracom/wp/wp-includes/l10n.php:203)
   in /Users/kraharvahar/Development/projects/migracom/content/plugins/content-aware-
   sidebars/content-aware-sidebars.php on line 1097
 * [https://wordpress.org/plugins/content-aware-sidebars/](https://wordpress.org/plugins/content-aware-sidebars/)

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

 *  Plugin Author [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * (@intoxstudio)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-when-creating-empty-group/#post-5442972)
 * Thanks for your kind words.
 * Where is the error message displayed on the screen? And does it show up when 
   clicking “Add New Group” or when saving a new, empty group?
 *  Thread Starter [Sciscitator](https://wordpress.org/support/users/sciscitator/)
 * (@sciscitator)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-when-creating-empty-group/#post-5442976)
 * Hey Joachim,
 * thanks for your answer.
 * I can reproduce the warning by doing the following steps:
    1) Clicking on “Add
   New Group” / “Erstelle neue Gruppe” 2) Clicking on “Save” / “Sichern” without
   adding any Content to the group
 * The warning displays inside the popup after the message “Die Gruppe darf nicht
   leer sein” (“The group must not be empty”).
 * Here’s the call stack:
    # Time Memory Function Location 1 0.0008 263264 {main}()../
   admin-ajax.php:0 2 0.7258 37351376 do_action( ) ../admin-ajax.php:85 3 0.7259
   37352896 call_user_func_array: …/wp-includes/plugin.php:505} ( ) ../plugin.php:
   505 4 0.7259 37352976 ContentAwareSidebars->add_sidebar_rule_ajax( ) ../plugin.
   php:505 5 0.7262 37362488 header ( ) ../content-aware-sidebars.php:1097
 * Kind regards
 *  Plugin Author [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * (@intoxstudio)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-when-creating-empty-group/#post-5442979)
 * Thank you. I can see how the error could be triggered, but I can simply not reproduce
   it.
 * What version of PHP are you using?
    Are there any text or whitespaces just before
   or just after “Die Gruppe darf nicht leer sein” (except the error message)?
 *  Thread Starter [Sciscitator](https://wordpress.org/support/users/sciscitator/)
 * (@sciscitator)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-when-creating-empty-group/#post-5443081)
 * Hey Joachim,
 * sorry for the late answer. I’m currently on a world trip and don’t have internet
   connection every day.
 * I tried with PHP 5.3-5.5, no whitespaces before or after.
 * But anyway I just updated to the new version and see that the error has fixed!
   Big thanks! 🙂
 * I just got another minor thing:
    If I add something to a group and click “Save”(
   or “Sichern” in german) I would expect that the current state goes back to “Edit/
   Delete” (or “Bearbeiten/Löschen” in german). This is not the case. I have to 
   explicitly click “Cancel” to get back to the “Edit/Delete” view. Not a big thing
   but still a small usability flaw imho.
 * Keep up the good work!
    Henrik
 *  Plugin Author [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * (@intoxstudio)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-when-creating-empty-group/#post-5443085)
 * Sounds great! And thank you for your feedback about the Save UX, I think you 
   are right that one would expect the state to go from “active” to “inactive” when
   saving.
 * My reasoning behind not doing it that way was that a user might want to save 
   a group several times when working on it, e.g. to make sure he would not lose
   any data if the browser crashed, connection disappeared etc. Therefore, I decided,
   the user should explicitly make the group “inactive” when he is done working 
   on it.
 * Clicking on “Add New Group” will also make the current group “inactive”.

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

The topic ‘PHP warning when creating empty group’ is closed to new replies.

 * ![](https://ps.w.org/content-aware-sidebars/assets/icon-256x256.png?rev=1815877)
 * [Content Aware Sidebars - Fastest Widget Area Plugin](https://wordpress.org/plugins/content-aware-sidebars/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-aware-sidebars/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-aware-sidebars/)
 * [Active Topics](https://wordpress.org/support/plugin/content-aware-sidebars/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-aware-sidebars/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-aware-sidebars/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-when-creating-empty-group/#post-5443085)
 * Status: resolved