• Hi

    We installed Icegram 1.10.19, but when we visited the ‘Add new campaign’ page we saw a PHP error in the sidebar. We upgraded to 1.10.20 but still see the following error :

    Warning: Invalid argument supplied for foreach() in /home/ourwebsite/public_html/wp-content/plugins/icegram/gallery.php on line 314

    This error is generated when the gallery.php script attempts to render the ‘Custom’ category in the left side bar using the line :

    foreach ($category[‘list’] as $sub_cat) {

    In the case of the ‘Custom’ category there is no key ‘list’ so the error is generated.

    The category array is populated form the options table using the option_value ‘ig_cat_list’ which holds a serialized array. In our case the serialized value is :

    a:4:{i:26;a:3:{s:4:”name”;s:12:”Message Type”;s:4:”slug”;s:12:”message-type”;s:4:”list”;a:11:{i:0;a:10:{s:7:”term_id”;i:23;s:4:”name”;s:10:”Action Bar”;s:4:”slug”;s:10:”action-bar”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:23;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:26;s:5:”count”;i:9;s:6:”filter”;s:3:”raw”;}i:1;a:10:{s:7:”term_id”;i:24;s:4:”name”;s:9:”Messenger”;s:4:”slug”;s:9:”messenger”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:24;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:26;s:5:”count”;i:8;s:6:”filter”;s:3:”raw”;}i:2;a:10:{s:7:”term_id”;i:25;s:4:”name”;s:5:”Popup”;s:4:”slug”;s:5:”popup”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:25;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:26;s:5:”count”;i:40;s:6:”filter”;s:3:”raw”;}i:3;a:10:{s:7:”term_id”;i:31;s:4:”name”;s:6:”Inline”;s:4:”slug”;s:6:”inline”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:31;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:26;s:5:”count”;i:5;s:6:”filter”;s:3:”raw”;}i:4;a:10:{s:7:”term_id”;i:34;s:4:”name”;s:5:”Toast”;s:4:”slug”;s:5:”toast”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:34;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:26;s:5:”count”;i:6;s:6:”filter”;s:3:”raw”;}i:5;a:10:{s:7:”term_id”;i:35;s:4:”name”;s:5:”Badge”;s:4:”slug”;s:5:”badge”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:35;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:26;s:5:”count”;i:1;s:6:”filter”;s:3:”raw”;}i:6;a:10:{s:7:”term_id”;i:36;s:4:”name”;s:6:”Ribbon”;s:4:”slug”;s:6:”ribbon”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:36;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:26;s:5:”count”;i:2;s:6:”filter”;s:3:”raw”;}i:7;a:10:{s:7:”term_id”;i:37;s:4:”name”;s:6:”Sticky”;s:4:”slug”;s:6:”sticky”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:37;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:26;s:5:”count”;i:3;s:6:”filter”;s:3:”raw”;}i:8;a:10:{s:7:”term_id”;i:39;s:4:”name”;s:7:”Overlay”;s:4:”slug”;s:7:”overlay”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:39;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:26;s:5:”count”;i:14;s:6:”filter”;s:3:”raw”;}i:9;a:10:{s:7:”term_id”;i:40;s:4:”name”;s:7:”Sidebar”;s:4:”slug”;s:7:”sidebar”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:40;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:26;s:5:”count”;i:2;s:6:”filter”;s:3:”raw”;}i:10;a:10:{s:7:”term_id”;i:41;s:4:”name”;s:3:”Tab”;s:4:”slug”;s:3:”tab”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:41;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:26;s:5:”count”;i:2;s:6:”filter”;s:3:”raw”;}}}i:27;a:3:{s:4:”name”;s:7:”Usecase”;s:4:”slug”;s:7:”usecase”;s:4:”list”;a:5:{i:0;a:10:{s:7:”term_id”;i:28;s:4:”name”;s:11:”Exit Intent”;s:4:”slug”;s:11:”exit-intent”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:28;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:27;s:5:”count”;i:2;s:6:”filter”;s:3:”raw”;}i:1;a:10:{s:7:”term_id”;i:29;s:4:”name”;s:5:”Optin”;s:4:”slug”;s:5:”optin”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:29;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:27;s:5:”count”;i:28;s:6:”filter”;s:3:”raw”;}i:2;a:10:{s:7:”term_id”;i:30;s:4:”name”;s:6:”Social”;s:4:”slug”;s:6:”social”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:30;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:27;s:5:”count”;i:3;s:6:”filter”;s:3:”raw”;}i:3;a:10:{s:7:”term_id”;i:44;s:4:”name”;s:6:”Yes-No”;s:4:”slug”;s:6:”yes-no”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:44;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:27;s:5:”count”;i:9;s:6:”filter”;s:3:”raw”;}i:4;a:10:{s:7:”term_id”;i:45;s:4:”name”;s:11:”Welcome mat”;s:4:”slug”;s:11:”welcome-mat”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:45;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:27;s:5:”count”;i:4;s:6:”filter”;s:3:”raw”;}}}i:32;a:3:{s:4:”name”;s:5:”Plans”;s:4:”slug”;s:5:”plans”;s:4:”list”;a:3:{i:0;a:10:{s:7:”term_id”;i:33;s:4:”name”;s:4:”Free”;s:4:”slug”;s:4:”free”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:33;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:32;s:5:”count”;i:45;s:6:”filter”;s:3:”raw”;}i:1;a:10:{s:7:”term_id”;i:42;s:4:”name”;s:3:”Pro”;s:4:”slug”;s:3:”pro”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:42;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:32;s:5:”count”;i:11;s:6:”filter”;s:3:”raw”;}i:2;a:10:{s:7:”term_id”;i:43;s:4:”name”;s:3:”Max”;s:4:”slug”;s:3:”max”;s:10:”term_group”;i:0;s:16:”term_taxonomy_id”;i:43;s:8:”taxonomy”;s:15:”custom_category”;s:11:”description”;s:0:””;s:6:”parent”;i:32;s:5:”count”;i:26;s:6:”filter”;s:3:”raw”;}}}i:51;a:2:{s:4:”name”;s:6:”Custom”;s:4:”slug”;s:6:”custom”;}}

    I have tried deactivating, deleting and re-installing the plugin.

    I have separately sent this info to your support contact form yesterday.

    Your assistance appreciated.

    Thanks

    Dave

Viewing 2 replies - 1 through 2 (of 2 total)
  • Looks like you’ve added the following to a new .21 release to fix the problem :

    if(!empty($category[‘list’])){

    Only (superficial) problem now is that the sidebar and the campaign panes don’t both float left correctly !

    Plugin Author Icegram

    (@icegram)

    @daveshawcios,

    Thank you for an update.
    Can you please give us some screenshot of the issue you are referring to.
    We will check and let you know.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t add new campaign’ is closed to new replies.