Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
2.2k views
in Plugins by
edited by

I updated the latest version of on-site-notification plugin and it works fine. But when I visited the plugin section of my website in the admin then it started to show warnings. What to do for these. 

 


Warning: Cannot modify header information - headers already sent by (output started at /home3/name1/public_html/name/qa-plugin/q2apro-on-site-notifications/q2apro-onsitenotifications-page.php:1) in /home3/name1/public_html/name/qa-include/qa-page.php on line 734

Warning: Cannot modify header information - headers already sent by (output started at /home3/name1/public_html/name/qa-plugin/q2apro-on-site-notifications/q2apro-onsitenotifications-page.php:1) in /home3/name1/public_html/name/qa-include/qa-page.php on line 224

Warning: Cannot modify header information - headers already sent by (output started at /home3/name1/public_html/name/qa-plugin/q2apro-on-site-notifications/q2apro-onsitenotifications-page.php:1) in /home3/name1/public_html/name/qa-include/qa-page.php on line 363

One more warning has started to show. Please help me with this.

Warning: Cannot modify header information - headers already sent by (output started at /home3/name1/public_html/website.com/qa-plugin/q2apro-on-site-notifications/q2apro-onsitenotifications-page.php:1) in /home3/name1/public_html/website.com/qa-include/qa-base.php on line 1366

Q2A version: 1.6.3

1 Answer

0 votes
by

Checking qa-page.php in v1.6.3 I see on line 734:

setcookie('qa_noticed', 1, time()+86400*3650, '/', QA_COOKIE_DOMAIN); // don't show first-time notice if a user has logged in

Line 224 also sets a cookie. Line 363 sets a header.

If this warning only appears in the admin/plugin section, you might want to modify file "q2apro-onsitenotifications-admin.php".

Because you have installed the plugin already, please try to remove the entire block of "function init_queries($tableslc) {...}" and see if the warning error still appears.

by
I have sent you a message please check that.
by
I updated the plugin on your server to the latest version, now it works without any errors.  Please keep your plugins always up-to-date. Thx, Kai
by
Thanks for your help, but I had uploaded the latest plugin around 10 days back but the errors were there.
It means that you have updated the plugin in the last week but I never got any notification to update the plugin in the plugin section?
by
I got the problem now. Thanks for your help.
...