After building and deploying a Sage theme to a site, I’m getting “mixed content” warnings on my console. Effectively, both editor.css and editor.js have http:// URLs, while the frontend css are loading with https:// correctly. I’ve looked at every setting, what am I missing?
Hey Alex, thanks for your feedback. About your points:
Staging domain is https, I also configured https for local dev (using Local) in case that made a difference, I also forced https via SITE_URL in wp-config.php
I ran wp-cli’s search-replace and even though I did have some http urls (that I replaced), that was not the issue.
I have a .htaccess rule, but not sure if that’s what you mean? I know there are some plugins that rewrite all calls to https, but I’d like to address the the underlying problem.
To add more info, on page/post edit page on WP’s admin on staging, I’m seeing this on view-source:
There you can see how ACF’s global CSS is loading ok over https but the editor’s CSS is not (.js either, that’s why I think this might have something to do with Sage’s build process)
Glad to report this issue resolved itself
To give some info for future devs with a similar problem… this got fixed after I had some issues and fixed them (might be related or not, who knows):
Enabled https with my local env (Local by flywheel)
Uninstalled Laravel Herd (was causing PHP conflict issues w/Local on the command line) following their docs & restarted
npm run dev was failing with bud errors, npm install was not installing. For some reason NODE_ENV was set to production.