Headers already sent error

Hi, I keep getting this error off and on. Not all the time, I just refresh the page n it gets fixed. But wondering if it might b something I can fix in the theme.

This site
http://rwdpagebuilder.com/client-demo/
Warning: Cannot modify header information - headers already sent by (output started at /home/rwdpageb/public_html/wp-content/themes/bb-theme/header.php:2) in /home/rwdpageb/public_html/wp-includes/pluggable.php on line 947

I’m using the plugin ninja demo. I would really not want to have to stop using it. Cuz it’s pretty cool.
But wondering if u have any idea wat could b the issue?

Hey Luis,

Do you think you could send us temp admin access to the site so we can check? If you could include FTP access as well that would be great! :slight_smile:

Ben

[Content Hidden]

Hey Luis,

How often does the error pop up? I got them earlier but now I can’t so there’s no way to tell if what I did fixed it. I just went over to the demo page a few times using an incognito window, closing it down every time to make sure it’s not cached. Are you still getting it from your end?

Ben

Ben,

No errors on my end. I also tried the incognito mode, don’t know why I didn’t think of that before.

Did you tweak something in the theme? I’d like to know because I’m assuming it will get overwritten in the next BB Theme update.

Hey Luis,

I actually got the error just now. I’m assigning one of the guys on this so they can check further. :slight_smile:

Ben

[Content Hidden]

Hi Luis,

I’m having trouble recreating this as well. I took a look at the lines throwing errors in the /home/rwdpageb/public_html/wp-includes/pluggable.php file and see that all of those lines are setting cookies. Cookies set in PHP are sent via headers that need to be sent before any HTML output, so it appears that something is calling wp_clear_auth_cookie after that point. We’re not doing anything like that, so I’m assuming it’s probably Ninja Demo’s error. Have you tried contacting them?

EDIT: I just checked and they are calling it in the Ninja_Demo_Sandbox::create method. I’m not sure if that’s causing the issue, but there’s a chance.

Justin

Hi Justin,

I will definitely contact ninja demo. Thanks for looking into this.

I hope they can fix it, because this plugin could sure help out a lot of bb agency users.

You’re welcome! Let us know what they say.

Justin

[Content Hidden]

Hey guys,

Thanks for doing some initial troubleshooting and moving this over so that I can respond! Our create sandbox method that you mentioned only happens when a user clicks on the “Try Demo” button. I think the issue that he is having is upon initial page load. I’ve done some digging, and I can’t find anywhere else in the plugin that calls the function you referenced. Can you find any other instances?

You bet! Thanks for helping with this. I didn’t find any other instances of wp_clear_auth_cookie in Ninja Demo, and Beaver Builder doesn’t make use of any login stuff. I’m wondering if maybe it’s a hosting issue. Do you think that’s possible?

HI guys,

and thanks for looking into this. Honestly it’s not a huge deal, I just found it very odd that it happens on the first page load and only with the BB Theme.

As far as hosting, the demo is currenly on SiteGround, and was previously on Hostgator, but I got the same error.

All in all it’s a great plugin and I really love it.

Perhaps with future updates the error will resolve itself.

Thank you,
Luis

Thanks, Luis. Do you know if it’s happening with other themes installed and the plugin? Meaning that it might be the theme that’s causing the issue? Just curious. If it’s happening with other themes, then the issue could be with the BB plugin.

Hey guys,

I haven’t been able to track this down on our end. We do use sessions, so could that be causing the issue?

Thanks for checking in! I haven’t made much progress either. I was able to recreate it intermittently on Luis’ site but not on my own server. Are you able to recreate the issue with Beaver Builder/Ninja Demo on your end?