“OpenLog is a lightweight front end Javascript plugin (< 1kb gzipped!) that sends your user’s console errors & warnings in real time to a dynamic dashboard built with Node.”
You can not have enough tools to track errors and warnings during development. OpenLog is a nice clean dashboard to keep an overview of things being logged.
It will automatically track console.log, console.info, console.warn and console.error.
You can also use its build in methods.
Javascript Error tracking is becoming more and more important, with applications moving to the client. Many service providers already offer a variety of extensive error tracking solutions for a price. These providers help to get around browser limitations and get the most out of errors.
Depending on your budget, that might not always be an option and not always needed.
To the rescue comes ErrorBoard, that provides a basic interface to track window.onerror events. Requires Node.js, NPM and a free port.
Here the window.onerror, how I set it up for now:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
// checks if there was a previously defined window.onerror and preserve it var oldOnError = window.onerror; window.onerror = function( message, url, line, column, error ) { if (errorMsg.indexOf('Script error.') > -1) { return false; } try { var e = encodeURIComponent; var meta = '{"project":"portalzine.de"}'; ( new Image() ).src = 'http://UrltoErrorBoard/error?message=' + e( message ) + '&url=' + e( url ) + '&line=' + e( line ) + '&meta=' + e( meta ) + ( error && error.stack ? '&stack=' + e( error.stack ) : '' ) + ( column ? '&column=' + e( column ) : '' ) ; } catch(e) { // we don't want errors to throw inside onerror } // Call any previously assigned handler if (typeof oldOnError === 'function') { oldOnError.apply(this, arguments); } // returning false triggers the execution of the built-in error handler return false; }; |
1 2 3 4 5 6 7 8 9 10 11 |
SetEnvIf Request_URI ^/error/ noauth=1 AuthType Basic AuthName "Nothing here for you!" AuthUserFile /yourpathto/.htpasswd Order Deny,Allow Satisfy any Deny from all Require valid-user Allow from env=noauth |
This will request no authentication, if the Request URI has /error/ in it.
1 2 3 4 5 6 |
add_action('init', 'pluginStartSession', 1); function pluginStartSession() { if(!session_id()) { session_start(); } } |
1 2 3 4 5 6 |
add_action('wp_logout', 'pluginEndSession'); add_action('wp_login', 'pluginEndSession'); function pluginEndSession() { session_destroy (); } |
Now go ahead and use $_SESSION freely in your plugin. Here a nice additional class to encrypt session data.
“This repository is a community-curated list of flexbox issues and cross-browser workarounds for them. The goal is that if you’re building a website using flexbox and something isn’t working as you’d expect, you can find the solution here.”
HyperDB is a plugin for spreading your websites load across several servers and databases. Its currently used in production on WordPress.com.
Just started experimenting with it :)
1 2 3 |
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L] |
Branded fashion to make brands good looking !