define( ‘WP_DEBUG’, true );

define( ‘WP_DEBUG_DISPLAY’, false );
define( ‘WP_DEBUG_LOG’, true );

Advertisements

phpcs . –standard=WordPress-VIP

phpcs . –standard=WordPress-VIP

Luke Edward says,

Curious — how do you all set up your local debug and logging settings? I highly recommend:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
define( 'SCRIPT_DEBUG', false );

On my Mac I open `<site> /wp-content/debug.log` in the built-in *Console* app and watch the log. I can also use `error_log()` statements to throw data into the log instead of full step-debugging or var_dumps to the screen. (`error_log(var_export( $var, true));` can be nice)

I was fighting with gulp-compass.

If you get this error,

Error in plugin 'gulp-compass'
Message:
    You need to have Ruby and Compass installed and in your system PATH for this task to work.

you have to install gulp-compass. The command is this:

gem install compass

but I got this error.

Building native extensions.  This could take a while...
ERROR:  Error installing compass:
	ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.23/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20180322-26786-1l64sic.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.23 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/ffi-1.9.23/gem_make.out
xcode-select --install

fixed the problem.

Seen this error more than once now –

>> Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (57)
>> For more information on which environments are supported please see:
>> https://github.com/sass/node-sass/releases/tag/v3.13.1
Warning: Task "sass" not found. Use --force to continue.

Some answers found here. https://github.com/sass/node-sass/issues/1764

tld;dr: try removing node_modules and running npm install.

npm rebuild node-sass

also helps.

gem install scss-lint

maybe as well.

I have a site that…

I have a site that requests TV schedules from Gracenote’s API. It wasn’t working locally due to cross origin header something something I don’t know. Here’s the error I was getting.

No 'Access-Control-Allow-Origin' header is present

I found a list of proxies here:

https://gist.github.com/jimmywarting/ac1be6ea0297c16c477e17f8fbe51347

Then I changed the api url in my source code to

https://cors-anywhere.herokuapp.com/http://myapiurl.com/etc/etc/etc

Now it works!

I have a site that…

I have a site that requests TV schedules from Gracenote’s API. It wasn’t working locally due to cross origin header something something I don’t know. Here’s the error I was getting.

No 'Access-Control-Allow-Origin' header is present

I found a list of proxies here:

https://gist.github.com/jimmywarting/ac1be6ea0297c16c477e17f8fbe51347

Then I changed the api url in my source code to

https://cors-anywhere.herokuapp.com/http://myapiurl.com/etc/etc/etc

Now it works!