Ivan Milic - Networks expert Ivan Milic CEO Ivan Milic

Top Menu

× To post a question you must be signed in.

Excel Like Product Manager flooding wordpress log with warnings

25 Apr 2020 16:33 #5926 by Roger Richards
Using the latest version of this plugin with Wordpress 5.4 / WooCommerce 3.9.3 / PHP 7.3.17. 
This plugin is constantly logging the following warning every few SECONDS:
[25-Apr-2020 16:01:22 UTC] PHP Warning: Cannot modify header information - headers already sent in ..../wp-content/plugins/excel-like-product-manager-for-woocommerce-and-wp-e-commerce/productexcellikemanager.php on line 271

I understand this is just a warning but it is flooding my log every few seconds.  Can it be suppressed? 

Please Log in or Create an account to join the conversation.

27 Apr 2020 10:00 #5927 by Super User
Hi,

that line should be:

setcookie('pelm_last_loaded_shop_type',$this->shop_type , time() + 3600 * 24 * 30, "/");

you can try to change it to:

@setcookie('pelm_last_loaded_shop_type',$this->shop_type , time() + 3600 * 24 * 30, "/");

(added @ in front)

although what your log says looks something is wrong because that should not be the case. This is plugin constructor area and WP should relay have not output before our or any other plugin is instanced. You may have problems with other parts of site and plugins and you should try to find out what does your WP outputs before plugins are instanced.

Please Log in or Create an account to join the conversation.

27 Apr 2020 15:24 #5928 by Roger Richards
Thanks for your advice.  Which file do I edit to make the change you recommend?

Please Log in or Create an account to join the conversation.

28 Apr 2020 10:31 #5929 by Super User
Main plugin file:

/wp-content/plugins/excel-like-product-manager-for-woocommerce-and-wp-e-commerce/productexcellikemanager.php 

Please Log in or Create an account to join the conversation.

28 Apr 2020 16:35 #5930 by Roger Richards
That fixed the constant warning in the log!  Thank you!

I now only have sporadic warnings when I am actually using and editing within the Excel Like Product plugin (but these have been there for a while and don't overwhelm my log file):

[28-Apr-2020 16:23:43 UTC] PHP Warning: Use of undefined constant treename - assumed 'treename' (this will throw an Error in a future version of PHP) in /home/askwino7/winelabnet/wp-content/plugins/excel-like-product-manager-for-woocommerce-and-wp-e-commerce/shops/wooc.php on line 7200[28-Apr-2020 16:24:06 UTC] PHP Warning: Creating default object from empty value in /home/askwino7/winelabnet/wp-content/plugins/excel-like-product-manager-for-woocommerce-and-wp-e-commerce/shops/wooc.php on line 251[28-Apr-2020 16:24:07 UTC] PHP Warning: Use of undefined constant treename - assumed 'treename' (this will throw an Error in a future version of PHP) in /home/askwino7/winelabnet/wp-content/plugins/excel-like-product-manager-for-woocommerce-and-wp-e-commerce/shops/wooc.php on line 7200
[28-Apr-2020 16:27:14 UTC] PHP Warning: array_keys() expects parameter 1 to be array, string given in /home/askwino7/winelabnet/wp-content/plugins/excel-like-product-manager-for-woocommerce-and-wp-e-commerce/shops/wooc.php on line 2052
[28-Apr-2020 16:27:20 UTC] PHP Warning: array_keys() expects parameter 1 to be array, string given in /home/askwino7/winelabnet/wp-content/plugins/excel-like-product-manager-for-woocommerce-and-wp-e-commerce/shops/wooc.php on line 2052
[28-Apr-2020 16:27:53 UTC] PHP Warning: array_keys() expects parameter 1 to be array, string given in /home/askwino7/winelabnet/wp-content/plugins/excel-like-product-manager-for-woocommerce-and-wp-e-commerce/shops/wooc.php on line 2052
[28-Apr-2020 16:27:53 UTC] PHP Warning: array_keys() expects parameter 1 to be array, string given in /home/askwino7/winelabnet/wp-content/plugins/excel-like-product-manager-for-woocommerce-and-wp-e-commerce/shops/wooc.php on line 2052

Please Log in or Create an account to join the conversation.

29 Apr 2020 09:34 #5931 by Super User
Update to  2.1.68

Thanks,

Please Log in or Create an account to join the conversation.

10 Jun 2020 20:30 #5951 by Roger Richards
This problem is back on the latest version of your plugin:

[10-Jun-2020 20:24:19 UTC] PHP Warning: Cannot modify header information - headers already sent in ...wp-content/plugins/excel-like-product-manager/productexcellikemanager.php on line 271

Please Log in or Create an account to join the conversation.

11 Jun 2020 08:23 #5952 by Super User
Hi,

you would have to repeat change from 27 Apr 2020 10:00
That message is thrown by setcookie  function because something else outputted content in that stage of site loading and it should not be like that.

Please Log in or Create an account to join the conversation.

11 Jun 2020 15:19 #5953 by Roger Richards
OK, no problem.  Made the patch and no more warning in log. 

Please Log in or Create an account to join the conversation.

Time to create page: 0.089 seconds