Sage, BrowserSync and Multisite

I worked out a bit of a workaround with the BrowserSync devs for an issue I was having getting BS to show updated css and recognize logged in status. Thought I’d share but would also appreciate a solution that doesn’t require snippets mode.
http://joelstransky.com/sage-browsersync-and-wordpress-multisite/

I use Sage (+ BrowserSync) on a multisite environment and haven’t ran into any problems.

The CSS however will simply not update.

Never seen this.

Nor will it recognize the logged in user.

Also never seen this.

Sounds like those issues could be related to whatever Vagrant box/setup you’re using.

Basically everything you had to do in your post shouldn’t be necessary :confused:

I’m actually happy to hear that. ShakyShane claimed that it was a known issue with BS not recognizing that you were logged in on a multisite. I kind of assumed the rest of my issues stemmed from that. He’s also the one that helped edit the BS gulp options. At any rate, I’m convinced it has something to do with my Vagrant box. This fix is acceptable until I have time to do that.

So actually, when you say logged in, do you have a lot of stuff on the front end that is dependent on being logged in?

I ask, because the sort of undocumented workflow is to log in to the WP dashboard and do any updates there at the normal URL. Browsersync should be used as a sort of “what the visitor sees”, and for most WP sites, shouldn’t be required to log in.

This is mostly because of how WP loves to throw full URL’s into the database if you’re not careful. Logging in to the dashboard and creating some links in a WYSIWYG will actually save them as http://localhost:3000/link

But aside from that, I’m not sure what actual limitation there is on BS and not allowing you to log in or stay logged in…

No admin, just front end.

for most WP sites, shouldn’t be required to log in.

User management is a huge part of wordpress. There’s no reason to avoid using it.

No, except for one reason I gave.

I updated my post so as to not point any fingers at Sage.

So um, yah. Finally pinned down the problem I was having and it had nothing to do with BrowserSync. Turns out it was an Apache cacheing issue.
For anyone that stumbles across this:


https://forums.opensuse.org/showthread.php/445462-How-clear-Apache-cache/page2

I just had to add EnableSendfile Off to my VM’s httpd.conf file.