Tag Archives: debug

Google font WOFF in Firefox

8 Feb

Problem In a website that gets fonts from Google’s CDN, the browser window loading icon continuously runs.  In Firebug you can see that the WOFF file from google is the culprit.   Solution Turn off Firebug.  Apparently it’s a problem with Firefox/firebug that causes this issue.  Once you turn off firebug the website loads and [...]

WordPress Widget Image Field

19 Sep

I found a great utility plugin to help with adding a Image picker field to a widget.  Basically you install and activate this plugin and you make your own widget and utilize the image field easily. The only problem I had was that it didn’t work in Firefox.  I found a simple error on line [...]

WordPress “The plugin generated xxxx characters of unexpected output during activation”

11 Sep

Problem I was developing a plugin for wordpress and receive a messsage: The plugin generated 496 characters of unexpected output during activation Solution I placed the following code at the end of my plugin file, update_option(‘plugin_error’,  ob_get_contents()); then looked in the wordpress options table using the query “SELECT * FROM `wp_options` WHERE option_name = ’plugin_error’” Then I could see what [...]

Cannot redeclare class require_once

12 Jun

Problem I’m using classes and making each class a file. when I’m including dependet classess, I use require_once to avoid multiple declarations – yet I get a Fatal error: Cannot redeclare class…   Solution Make sure all files that require the class have require_once and also make sure that the path that is required is the same case [...]

Other Languages showing as ??? in WordPress

29 May

Problem I copy-pasted some Japanese text into the WordPress editor and it shows as ????.  On another server, pasting the same japanese text shows the japanese text on the page.  No plugins seem to be affecting this.  Something with the server or WordPress configuration must be affecting displaying the foreign characters. Solution The problem was [...]

WordPress debugging

25 May

Some useful tips for debugging wordpress will be listed here for future reference. Display All Hooks If you need to display all hooks, use the command below.  It is useful when trying to find a hook to alter some part of wordpress. add_action( ‘all’, create_function( ”, ‘var_dump( current_filter() ); ‘ ) ); Display all for [...]

WordPress Deactive Plugin

5 Apr

Problem I had a wordpress site where the public side was fine, but the admin side was throwing a Internal Server Error 500 intermittently.   I couldn’t figure out what was wrong since I had done no changes, and my host said nothing was wrong with the server.  To solve mysterious crashing errors in WordPress, the [...]

iPhone Viewport and position absolute

20 Jan

Problem I have a div with id “stripe” that is using absolute positioning to be at the top of the page and span 100% of the page width.  It overlays the top part of the website.  The rest of my page is 1000px wide.  When viewing on the iPhone, the “stripe” div is only a [...]