The debug tag has no wiki summary.
25
votes
13answers
988 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 ...
24
votes
1answer
305 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 ...
9
votes
2answers
262 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
1k 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
179 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
3answers
395 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 ( ...
5
votes
2answers
59 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
1answer
369 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
4k 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
2answers
365 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 ...
4
votes
3answers
515 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 ...
3
votes
4answers
504 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
177 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 ...
3
votes
2answers
919 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
2answers
221 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 ...
2
votes
4answers
647 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
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
120 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
3answers
138 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 ...
2
votes
1answer
91 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
53 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
394 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
0answers
46 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
132 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
175 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
2answers
226 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
1answer
556 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?
1
vote
2answers
75 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
30 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
1answer
90 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
1answer
91 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 ...
1
vote
3answers
167 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, I've uploaded the list of queries to http://bit.ly/kPyyu1, would ...
1
vote
2answers
161 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
47 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
516 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', ...
1
vote
1answer
348 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
299 views
Do WP_debug notices explain why my site runs so slow?
When I enable WP_DEBUG, I get lots of the following kinds of notices (see below). Of course, I normally don't have the debugging turned on, but I'm wondering if these are a clue as to why it takes so ...
1
vote
2answers
278 views
Moved my Wordpress site and now it can't read the theme
I moved my Wordpress website on Friday (so DNS propagation should be long finished) and now the site has no theme. I spent time yesterday re-installing the theme and Wordpress but to no avail. It ...
1
vote
1answer
71 views
Filtering custom taxonomies
This is a cross post from the WordPress forums, which I apologize for, but it has been almost a week and not getting any response there so hoping someone here can help. If I do get a reply in either ...
1
vote
0answers
66 views
Debugging unserialize errors
NOTICE: wp-includes/functions.php:232 - unserialize()
I get this error of varying lengths on the admin pages of several of the sub-blogs of my multisite instance. It doesn't happen on all the blogs, ...
0
votes
2answers
200 views
Wordpress: Notice:Object of class WP_Query could not be converted to int in on line
I am facing issue in debug mode with wordpress. In my featured slider getting error
Notice: Object of class WP_Query could not be converted to int in on line
I am using below code for my slider
...
0
votes
1answer
120 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 ...
0
votes
2answers
247 views
Front end empty (i.e. nothing displays); Back end looks fine; What are possible causes?
My customer's site was working last night. Today nothing displays from the front end. Firebug gives as the contents of the home page. I logged in. The back end looks fine. The most recent post (added ...
0
votes
2answers
32 views
Should all references to a text domain be to my current theme?
I'm running Theme Check on a theme I've inherited and I've come across lots of recommendations like this one:
RECOMMENDED: Text domain problems in loop.php. The twentyten text domain is being used!
...
0
votes
1answer
673 views
register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead
I turned on my Debugger and got this error...
Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in ...
0
votes
2answers
155 views
WordPress Ajax Problems
Update
I got it to fire using the following curl command:
curl -H "Accept: application/json" -X POST http://localhost/wordpress/wp-admin/admin-ajax.php -d ...
0
votes
1answer
155 views
Add body class based on existance of post thumbnail. Code works but receiving PHP Notice
What I'm trying to do is add a body class based on whether there is a post thumbnail. The following works, but I get a PHP Notice. How can I fix the PHP Notice below?
function ...
0
votes
1answer
78 views
Getting a WordPress Debug Strategy
I have been reading up on debugging. I watched Chip Bennett's video on wordpress.tv and was inspired to take debugging seriously. What I have found in my reading up though has confused me a bit. I ...
0
votes
2answers
202 views
debugging errors.. how to remedy?
I had trouble accessing wp-login.php, so I changed the name of the theme I'm developing to force WP to switch to default. I then turned on debugging and received the errors below. I'm a little puzzled ...
0
votes
1answer
124 views
Notice: attribute_escape is deprecated
I have WP_DEBUG set to ON to show errors and notices. Of all notices the one that is bothering me is Notice: attribute_escape is deprecated since version 2.8! Use esc_attr() instead. in ...