Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headers already sent #46

Closed
bklein1979 opened this issue Jul 27, 2022 · 1 comment
Closed

Headers already sent #46

bklein1979 opened this issue Jul 27, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@bklein1979
Copy link

Bug Description

When accessing WooCommerce on our site we are getting the following error above the products:

`Warning: Cannot modify header information - headers already sent by (output started at /homepages/36/d333902371/htdocs/newsite/wp-content/themes/covernews-pro/header.php:13) in /homepages/36/d333902371/htdocs/newsite/wp-content/plugins/simple-jwt-login/src/Helpers/CorsHelper.php on line 13

Warning: Cannot modify header information - headers already sent by (output started at /homepages/36/d333902371/htdocs/newsite/wp-content/themes/covernews-pro/header.php:13) in /homepages/36/d333902371/htdocs/newsite/wp-content/plugins/simple-jwt-login/src/Helpers/CorsHelper.php on line 13

Warning: Cannot modify header information - headers already sent by (output started at /homepages/36/d333902371/htdocs/newsite/wp-content/themes/covernews-pro/header.php:13) in /homepages/36/d333902371/htdocs/newsite/wp-content/plugins/simple-jwt-login/src/Helpers/CorsHelper.php on line 13`

These seem to correlate to the three options on the CORS page of the plugin, when removing one or more of the options the number of errors is reduced but still remains. The error looks to be due to conflicting code in covernews-pro theme.

Environment

Question Answer
PHP version 7.2.34
WordPress version 5.7.6
Simple-JWT-Login plugin version 3.4.6
@nicumicle nicumicle added the bug Something isn't working label Oct 20, 2022
@nicumicle
Copy link
Owner

Hello @bklein1979 ,
I wrote this blog post on how you can set CORS on the server side.
Check it here: https://simplejwtlogin.com/blog/cors-setup-apache

After doing that, you can disable the CORS from the plugin and everything should work ok.

Also, there might be an issue with the theme.

Hope this helps. I will close the issue for now, and re-open it in case that does not fix your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants