The tag has no wiki summary.

learn more… | top users | synonyms (1)

29
votes
13answers
2k views

How do you debug plugins?

I am pretty new to plugin authoring and was having a hard time debuging. I used lots of echo and it is sloppy and ugly. I am sure there is a better way to do this, maybe an IDE with a debugger that ...
25
votes
1answer
320 views

How to perform unit testing on proposed patches in Trac?

I was looking for some insight and good resources on how to correctly perform unit testing on proposed WordPress patches in the Trac and how to accurately report the results from the testing. I'm new ...
10
votes
3answers
2k views

Define WP_DEBUG conditionally / for admins only / log errors (append query arg for all links?)

I'm developing a site on a server that the client has access to as well and what I'd like to do is show WP_DEBUG only for administrators. Referencing Yoast's article on a way around this: if ( ...
10
votes
2answers
1k views

Does the functions.php file ever get called during an AJAX call? Debug AJAX

Trying to figure out an issue a fellow programmer is having. I was wondering if the functions.php file get called at all when you do admin side AJAX? I know that when you do an AJAX call a part of ...
8
votes
4answers
2k views

How to debug a plugin with Xdebug?

I was able to install and setup quite easily NetBeans 6.9.1 and Xdebug on my local environment, based on PHP 5.3.0 (XAMPP). My problem now is the following: if I put a breakpoint on Wordpress's ...
6
votes
2answers
255 views

Debugging WordPress themes with Xdebug, real time html output

Hi I'm using XDEBUG to debug my WordPress code, is it possible to view the page building up in the browser while debugging? At the moment the page just hangs until the debugging process is finished ...
5
votes
2answers
2k views

Count & Display Database Queries

I'm looking for an solution how I can count and display all queries in a WordPress site. Does anybody know, if there is an good plugin? Otherwise it would be an solution to check the queries on the ...
5
votes
1answer
377 views

CPT Template Not Showing - Getting 404

I'm developing a Custom Post Type plugin, which works fine in dev. Now that I've moved it to production, I'm getting a 404 when I try to display the template for the CPT. So, two questions: 1- Is ...
5
votes
2answers
225 views

Is there any debug toolbar that shows whick hooks are called for the current page in Wordpress?

In Django there is a debug toolbar that shows which template files and hooks are called while rendering a page. Is there any plugin that shows which hooks are called for the current page in ...
5
votes
3answers
1k views

Print WordPress template filename(s) for debugging

I've taken over the maintainance of a large WP-MS powered site. The site has ~200 templates, many page specific, and with no standard naming procedure. It would save a lot of time if while surfing ...
5
votes
1answer
541 views

Weird behaviour when adding terms/term_taxonomies programmatically

This certainly looks like a bug to me. I put together the following code for you to test it on a fresh install. Basically, the code will add two sub categories under the "uncategorized" to achieve ...
4
votes
5answers
5k views

How to eliminate weird 404 errors in wp-admin?

I run a WordPress site with about 70 active plugins. Every so often, I'll get a random error page ("Not Found", though I haven't checked the headers to see if it's a 404) on a /wp-admin/ page that ...
4
votes
1answer
1k views

Tutorials for Unit-Testing in WordPress and for unit-test.svn.wordpress.org?

I'm starting to learn Selenium and PHPUnit and I am interested in implementing what I've learned in my WordPress projects. I've seen http://unit-test.svn.wordpress.org and wonder if there are any ...
3
votes
4answers
755 views

What is the best way to monitor PHP functions/executions?

I am trying to find the best way to monitor which PHP code/functions, MySQL requests and/or plugins are slowing down pages on a site. I know there are a bunch of different options out there including ...
3
votes
1answer
37 views

Listing registered scripts

Back story : We have a number of wordpress web sites experiencing issues when viewed on some IE8 browsers. The errors include the page loading but not being displayed (either a blank screen is ...
3
votes
2answers
251 views

Identify which loop you are hooking into; primary or secondary?

What is the most efficient way to determine which loop I'm in? I have a few plugins that alter the query by hooking into various parts of WP_Query::get_posts(), through the usual suspects, ie ...
3
votes
1answer
66 views

Get list of scripts / styles and show file which enqueued them

I want to show what scripts and styles have loaded on a page and which plugin / theme / file has added them to the page. We can show all scripts and styles using: <?php global ...
3
votes
3answers
1k views

Is it possible to change the log file location for WP_DEBUG_LOG?

I use WP_DEBUG_LOG in my development environment and have no issues with debug.log being in the wp-content directory. Sometimes I turn on WP_DEBUG in production when I need to debug something, and I ...
3
votes
3answers
703 views

How to Debug the 'save_post' Action?

Is it possible to validate PHP code? I have a Custom Post Type (Film) with Custom Meta Boxes. Everything is working fine, I can add new Films and details to the Custom Meta Boxes. My problem is ...
3
votes
1answer
92 views

Is it possible to display the admin bar while in the Theme Customizer?

I've been using Debug Bar + Kint Debugger for debugging. Presently I'm working on a custom theme where I'm trying to hook some code into customize_save_after. The code doesn't appear to be running ...
2
votes
2answers
173 views

Adding callback function for wp_ajax_ has no effect

I was trying to add one more callback function to the WordPress AJAX action woocommerce_apply_coupon. This action is defined in the WooCommerce plugin, I want to add my own callback function to this ...
2
votes
1answer
1k views

How to var_dump nav menu items from anywhere?

I wanna preview all the fields that the nav menu $item array holds. Is there a function to fetch it from anywhere and place it inside var_dump?
2
votes
4answers
747 views

How to debug WordPress correctly?

I'm using a few plugins and UpThemes framework on my new website and if I turn on Wp Debug I can see that there are a few errors related to Deprecated functions (but website is working). What I would ...
2
votes
1answer
159 views

How to empty debug.log when file size is above xyMB?

Sometimes I forget to empty my debug.log file (or that it exists) and after trying to get around a bug, I find it having simply too much content to open it in ex. the basic Windows Text Editor. Part ...
2
votes
4answers
1k views

Integrating WP as a CMS with a Bug Tracker

First of all, I can't use Trac, which is what the WP dev community uses to track bugs. However, my consulting company is using WordPress as a CMS for just about everything - product information, ...
2
votes
4answers
582 views

Debug whats going on inside a function called from AJAX

I have a link on my post edit page (admin side) that calls up AJAX and jQuery to run a function inside my functions.php page. The link is wired up and calling the jQuery but I can't seem to debug ...
2
votes
1answer
2k views

How can I see all the actions attached to an “add_action” hook?

I'm working with the admin bar and trying to debug some of the menus and their priorities. I know several callbacks get bound to actions, such as this one: add_action( 'admin_bar_menu', ...
2
votes
1answer
116 views

Wordpress visual editor broke due to non standard port?

I recently installed WordPress on my own server, which uses non-port 80 Apache service. I could view posts but the tinymce editor constantly broke. More specifically, all menu items in visual editor ...
2
votes
1answer
63 views

Using a _GET gives me a debug error (over my head)

Just looking for some advice on something that is bugging me. Please bear in mind I am a PHP noob :-) I am passing a variable in the url to my WP index page like so: <a href="<?php ...
2
votes
1answer
581 views

WP 3.4 has missing photo data

I just updated to WP3.4 and discovered that previously available images are no longer "found" by the system. By this I mean that all the image files remain online and accessible, but WP has lost ...
2
votes
1answer
185 views

WP Cron emails not working

Running wp 3.5.1. I have 2 plugins that work in part. They do everything nice. If I click to send emails, they send the emails. However the scheduled emails are not being sent. The plugins are: ...
2
votes
3answers
143 views

Super WordPress debugging toolkit and triage procedures? [duplicate]

Possible Duplicate: Software for WordPress Theme and Plugin Development? What do you use or carry with you in your "toolbelt" when approaching an existing WordPress site that you've got to ...
1
vote
2answers
168 views

How do I find the version of WordPress I have from the source code?

Given a copy of WordPress installation, how do I find out what version it is from the source code?
1
vote
2answers
247 views

I changed post_type and now I receive 404 errors

I changed a custom post_type to a different name. Now when I view a single page with the post_type I receive a 404 page. How do I debug? Is there a WP log I can view the functions call?
1
vote
3answers
708 views

Why is admin ajax reloading my page

As far as I know I haven't used Ajax anywhere in my code. Yet, while debugging, I have breakpoints being hit with 'admin-ajax.php' at the root of the call stack. This second hit of my breakpoint ...
1
vote
2answers
514 views

How to use WP-FirePHP extension?

http://wordpress.org/extend/plugins/wp-firephp/ I'm simply supposed to call fb('Error message','Lable') but it doesn't work all the time. I can't figure out when and where the relevant files are ...
1
vote
1answer
111 views

if(!is_user_logged_in()) returns true when 404

I'm running a closed website for registered users only. For doing so I check in if user is logged in // no non-authenticated users allowed if( !is_user_logged_in() ) { ...
1
vote
1answer
2k views

Debugging an error: wp_enqueue_style was called incorrectly

I've just uploaded a new, custom theme to find that the container is a fraction of the intended width, and the sections below the home section(this is one single page, long site utilizing ids/anchors ...
1
vote
1answer
46 views

Where's The Best Place to use Register_Shutdown_Function()?

I want to use Register Shutdown Function to track Fatal Errors, my question is, where's the best place to call this so it hits both WordPress, Plugin, and Theme Fatal Errors?
1
vote
1answer
182 views

How to debug a blank page?

I'm not being able to load this page, although I can easily load all other posts that load the same custom post type template (please look for "// From now on, WP is throwing a blank page" on that ...
1
vote
2answers
458 views

Using FirePHP with WordPress

I am trying to make it so that I can output to the console in PHP. I have already installed FireFox with the FireBug and FirePHP addons. I downloaded the 'FirePHPCore Server Library' from here and I ...
1
vote
1answer
105 views

Theme Check: Could not find post_class

I've inherited a theme from a another developer that I've re-styled for a client. We're just about finished, but I thought I'd run it through the Theme-Check plug-in to see if there's any errors or ...
1
vote
3answers
4k views

Unhook jQuery from WooCommerce via `functions.php`? [closed]

So I am using the http://woothemes.com/woocommerce/ plugin for eCommerce and it's registering jQuery local and conflicting with my default jQuery call from Google CDN. It took a long time but I ...
1
vote
1answer
119 views

Why do plugins that cause 'unexpected output' create AJAX problems?

I just had to fix an AJAX failure in the admin area (the search/attach dialog box in the Media Library wasn't working) and tracked down a plugin that was the culprit. On activation, this plugin was ...
1
vote
3answers
205 views

Huge amount of queries on my site

My site is reaching CPU limits all the time, I just ran Debug Queries and got more than 4000 queries, no wonder site is slow.
1
vote
1answer
889 views

Control verbosity level of WP DEBUG?

I've been at a loss so far and so I thought I'd pose the question: Is there a way to modify the verbosity level of the WP debug.log via wp-config.php or elsewhere? Just an fyi, here is what I have in ...
1
vote
2answers
247 views

How to debug a unit test for a WordPress plugin, which uses wordpress-test?

I'm attempting to debug a unit test for a WordPress plugin. The unit test uses wordpress-test (and PHPUnit). However, wordpress-test: calls system(php ...) the new external PHP process attempts to ...
1
vote
1answer
57 views

debugging wordpress

I noticed that when I'm working on a php page that loads wp programmatically, some of my errors are not fired. For example, a variables that has not initialized previously creates a warning when I ...
1
vote
1answer
705 views

Preferred Method of debugging a wordpress SQL calls?

What is your preferred method of debugging Wordpress Applications when writing custom behind-the-scenes SQL calls, etc. ? Coming from a Rails background, I usually tail a log file that displays not ...
1
vote
1answer
107 views

Debugging - trying to add search box to menus

I have already asked a similar question at stackoverflow (http://stackoverflow.com/questions/22492292/add-filter-in-wordpress-how-do-i-know-if-it-is-run), but maybe that was the wrong place? As you ...