-
Notifications
You must be signed in to change notification settings - Fork 573
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
Loading scripts on localhost #118
Comments
Sounds like you're on windows, and this condition is not being met: Can you do me a favor and place this at the top of your functions.php and let me know what it gives you? wp_die( '<xmp>PHP_OS: '. print_r( PHP_OS, true ) .'</xmp>' ); |
Yes, I am on wndows. And already fixed my issue. |
I'm having the same issue. Yes, Win 7. ServerPress 3.6.5. Looks like cmb2_utils()->url is busted. I think I upgraded CMB2 and WP around the same notice before noticing this. That is, I'm not sure if it's WP core or some new update to CMB2. p.s. I'm curious, what does cmb2_utils() do that WP doesn't already offer? I presume it somehow detects how CMB2 is being used / where it's installed, correct? |
Testing in IIS7.5 everything is working as expected. Going to test further with Apache on Windows to see if that breaks it somehow. |
Closing as this is over a year old. |
I get this issue developing on XAMPP - PHP_OS: WINNT Able to fix it on dev using
But would be nice not to |
Thank - the str_replace is a good idea. Its a Windows mklink that caused the issue |
Hi guys, I had a problem with loading scripts on localhost, and I modified the code a little then it works. I think I should let you know about my issue.
On the file CMB2_hookup.php
Changed the commented code to uncommented code.
//wp_register_style( 'cmb2-styles', cmb2_utils()->url( "css/cmb2{$min}.css" ), $styles );
wp_register_style( 'cmb2-styles',get_template_directory_uri()."/inc/cmb2/css/cmb2{$min}.css", $styles );
Before I making changes, scripts were loading like this
src="http://website.com/D:\workspace\projects\myproject\file.js"
Thanks
The text was updated successfully, but these errors were encountered: