Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [debug]

Basic techniques on debugging WordPress that can assist you on first hand.

Filter by
Sorted by
Tagged with
0
votes
1answer
19 views

problem with size of debug.log file

my debug.log file in wp-content size in above 4GB and have trouble with that. can I delete this file from the server? if delete debug.log file ، No problem with my site? Does everything correctly run ...
0
votes
1answer
46 views

How can I find the cause of a 500 server error?

I'm not sure if this question fits this site, since the title specifically mentions development of WordPress. Anyway, i am running a Linode Debian Stretch server that I just built. Previously, I was ...
0
votes
1answer
49 views

Echo Text If User Is Logged in But NOT the Author of post

i am coding a plugin, where user can subscribe to a indvidual author of post (like we do on YouTube). I want to display the subscribe link to all logged in users, but not the author of post. my ...
0
votes
1answer
160 views

What is debug.log.old? It seems to take up a lot of space

what is debug.log.old (please see attached image). It seems to take up a lot of space. Is it necessary to delete it? Or should I leave it alone? Thanks
0
votes
1answer
214 views

Wordpress Cron job, 302 response

I am trying to debug a cron job in wordpress. It's supposed to update user hours but doesn't, and after putting some test statements in the code, I'm not too sure it's even running. I have debug ...
0
votes
1answer
272 views

.PO file is found but I don't see translations: how to debug the problem?

I have installed the Stack theme, and I want to make Danish translations. I have downloaded the Stack.pot file, made the modifications I need, and uploaded them to: /wp-content/themes/stack/languages/...
0
votes
2answers
124 views

Hooks for post saving make a post-new.php to load latest post's data

In my plugin I'm using add_filter('wp_insert_post_data','filter_blog_post_data'); for filtering blog data before it gets saved in the database. However this hook makes post-new.php to load latest ...
0
votes
1answer
338 views

debugging wp_cron jobs with XDebug in Eclipse

I use Eclipse for PHP Developers (Neon.3 Release (4.6.3) in case it matters) and XDebug when developing plugins/themes. It all works fine (i.e., I can set breakpoints in my plugin's code and step ...
0
votes
1answer
70 views

WordPress debug messages not displaying

WordPress is not displaying any errors / debug messages, even though I double- and triple-checked every setting. In php.ini, I have error_reporting = E_ALL & ~E_NOTICE display_errors = On ...
0
votes
1answer
770 views

Getting “Cannot modify header information - headers already sent” error, but only on backend

When I enable WP_DEBUG, I am getting the error: WARNING: wp-admin/admin-header.php:9 - Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/...
0
votes
3answers
149 views

Comment WP_DEBUG in wp-config file

I just want some information about WP_DEBUG. What happen if I comment this line in wp-config.php files define('WP_DEBUG',true); I had an issue on the site where my server getting down and database ...
0
votes
1answer
31 views

Where are WP_Errors Saved

Hi it seems to be trivial question but it is the one I can not find an answer of. I am tweaking a wp site developed by somebody. They have used custom errors and they are getting errors by ...
0
votes
1answer
759 views

Wordpress custom widget undefined variable notice

I am developing a theme and I have created a custom widget for it. When I turn on debug mode I get the following notices, NOTICE: wp-content/themes/integral/inc/widgets/feature_widget.php:92 - ...
0
votes
1answer
95 views

add button to specific post

This code is designed to add a button to specific posts using the get_post_meta function. How do I alter the get_post_meta function to display this button on a specific post? I have already tried ...
0
votes
1answer
190 views

How can I remove text above the header? [closed]

Embarassing problem here. A while back I added a debugging statement of showing the url of the current page, but now I can't find it to remove it. I don't remember what methods/variables I used either....
0
votes
3answers
633 views

How to dump/log default values that are passed to hooks/filter functions?

Here's a quick example of I am trying to achieve: I am using this filter: add_filter('manage_edit-member_columns', 'set_custom_edit_member_columns'); function set_custom_edit_member_columns($...
0
votes
1answer
37 views

what are WP_DEBUG conditions?

i'm trying to debug my theme using below code to find out some errors,do i need to fix all errors or is it OK when i ignore some of them? error_reporting(E_ALL); ini_set('display_errors', 1); define(...
0
votes
1answer
9k views

“Notice: Undefined variable: content” is showing [closed]

I am using this code if for showing related content form custom taxonomy. But it is showing "Notice: Undefined variable: content" Here is my code: <?php /* Plugin Name: Related Post */ ...
0
votes
1answer
672 views

Following/tracing page construction through theme PHP

What tools and methods will allow me to figure out how a page is being constructed by WP? I have a mix of plugins that are involved in the theme, and starting with the code I can't begin to figure ...
0
votes
2answers
1k views

Preview with Custom Post Type Not Working

At this point I have tried everything I know to fix the issue. Issue: preview only works right after a custom posts is loaded or updated. If you make any changes or hit preview twice without updating ...
0
votes
1answer
72 views

How do I debug an error that a plugin is causing?

I'm having an issue debugging why the plugin I'm creating keeps displaying the error You need to upgrade your database as soon as possible.... The work I've done so far has been on a remote dev site, ...
0
votes
1answer
1k views

Undefined variable error in theme option after updating theme [closed]

I have built a theme.. Now i have updated the theme and my theme consist of two new fields in the theme option panel <input id="welcome_post_char" type="text" name="abc_options[welcome_post_char]" ...
0
votes
1answer
48 views

Best place to call xdebug helper functions?

Right now I place the following code wherever I expect something to go wrong. /** xdebug helper */ error_reporting(E_ERROR); ini_set("display_errors", 1); ini_set("html_errors", 1); ...
0
votes
1answer
407 views

Cannot Modify Header Information - While trying logging in

I am having the same issue as cited on: https://wordpress.stackexchange.com/questions/80276/cannot-modify-header-information-headers-already-sent-theme-specific-functi Can you give me a help on that. ...
0
votes
2answers
123 views

Wordpress + Buddpyress - troubleshooting server overloading

I have a Wordpress+Buddypress installation which is regularly going down - the number of HTTPD on the server and the server CPU load both peak suddenly and the server fails to recover. A restart of ...
0
votes
1answer
1k views

How can I understand what is the cause of WP death (white screen)?

I have some problems on a admin side: when i try to filter posts according to any category, or when I publish a post, I see a white screen of WP death... The content of debug.log is: [17-Jun-2012 ...
0
votes
1answer
1k views

Weird undefined index: id,std notices. How to fix it?

Ok I'm running my wordpress in debug mode. I'm getting lot of notices. This is my code. <?php //allows the theme to get info from the theme options page global $options; foreach ($options as $...
0
votes
1answer
2k views

Fix warning: Missing argument

i want to submit a theme to the wordpress.org. when i put the define('WP_DEBUG', true); in my wp-config.php. my theme showed some errors.but i don't know how to correct theme. Q1:Warning: Missing ...
0
votes
1answer
341 views

my blog crashes ie7?

weird problem. My blog theme works fine in ie8, ie9 and all other major browsers... however ie7 doesn't even render it? in ie7 it seems like my blog even has serverside problems? any idea what could ...
0
votes
3answers
666 views

page template - undefined structure in source code

hey, i have the following page template for a sitemap. <?php /** * Template Name: Sitemap */ ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div> &...
0
votes
2answers
181 views

Is there ANYTHING about this query that's incompatible with WordPress 2.9.2?

I've been puzzling over this one for two days. Still can't figure it out. I'm testing a theme release in multiple versions of WordPress using xampplite on localhost on a PC. I'm having a problem on ...
0
votes
2answers
83 views

Why is adoptStyles-css stylesheet link added to every page?

By looking at the source of any of the WordPress pages on my site, I can see there is this stylesheet link: <link rel='stylesheet' id='adoptStyles-css' href='http://mydomain.com/wp-content/...
0
votes
1answer
16 views

Wordpress website working fine on localhost but not displaying front pages on webhost

The website works perfect on my localhost. I used duplicator plugin to upload it on my web-host. Database connections are established since mywebsite.com/wp-admin works perfect. I can login the ...
0
votes
1answer
28 views

XAMPP-VM Mac OS Mojave wordpress debugging using XDebug

Someone please point me to a knowldge article or information on how to setup Xdebug on XAMPP-VM Mac OS in particular. The dev configuration: XAMPP-VM Mac OS Mojave 10.14.6 VScode with PHP debug ...
0
votes
1answer
15 views

Getting value of variable from functions.php and debugging it

I am trying to inspect a variable obtained in functions.php for debugging purposes. I am defining a variable $current_user by executing the shortcode to obtain the current logged-in user. Then I am ...
0
votes
0answers
10 views

How to debug in wordpress like we do in java in eclipse F6,F5 and F7?

I am very new to wordpress. I have always worked on Java and its related frameworks like Spring,Hibernate. I find it very difficult to understand the flow without debugging. Is there any way to debug ...
0
votes
0answers
8 views

wp_option table breaks layout when merging CSS

When merging css files the whole layout breaks as if no css file were being called, no matter what plugin I am using for merging. After starting a fresh install and migrate data step by step I found ...
0
votes
1answer
23 views

Problem in plugin debuging in wordpress

I want to save extra user fields in custom table after user register. In my plugin I added user_register hook and I am checking this code while user register but I cannot find any errors and cannot ...
0
votes
0answers
101 views

No debug log for WP multisite is created

Where is the debug.log file stored on multisites? I have inserted into my wp-config: define ('WP_DEBUG', true); define ('WP_DEBUG_LOG', true); define ('WP_DEBUG_DISPLAY', true); and analogous to ...
0
votes
0answers
84 views

Log with Query Monitor during AJAX

I am trying to log my own messages using Query Monitor API, which I found in the code, like \QM::info($msg), \QM::error($msg) etc. But nothing is written to the query monitor console or developer's ...
0
votes
2answers
230 views

error_log is not working as expected in functions.php file

Error log on my index file get logged in the error_log.txt file but the same error log is not working in the functions.php file. I am using the latest WordPress and PHP 7.0. I am not using any plugin ...
0
votes
0answers
49 views

Custom Code Review: non-numeric value encountered

I am getting a E_WARNING error on my child theme template for woocommerce/content-product.php Stack trace E_WARNING: A non-numeric value encountered in {closure} called at ? (?) in array_walk called ...
0
votes
0answers
137 views

Debugging preview not working problem

The link here is ?p=1448&preview=true Which should be redirected to the /index.php If I press that link it goes to: /?p=1429&preview_id=1429&preview_nonce=ddfbdb8ba3&_thumbnail_id=...
0
votes
0answers
388 views

Notice : Array to string conversion on array_intersect user meta

I am trying to check if two meta data has any common array values. Its returning an error Notice: Array to string conversion in functions.php on line 1026 which is $inbox = count(array_intersect($...
0
votes
1answer
262 views

WordPress database error: [Table 'wordpress.wp_transients' doesn't exist] SHOW FULL COLUMNS FROM `wp_transients`

This is the error message: WordPress database error: [Table 'wordpress.wp_transients' doesn't exist] SHOW FULL COLUMNS FROM wp_transients This error is displayed to me on every page I open and this ...
0
votes
1answer
531 views

How do I debug a short code?

I am trying to debug a shortcode. I have written the following function and placed in my theme's functions.php file: function michael_function_shortcode() { return 'This is the return'; } I ...
0
votes
0answers
71 views

Need Help Understanding Debug Log Errors

I have these errors in my debug.log and I'm at a loss as to how to go about fixing them. I believe they are the culprit behind one of my plugins automatically logging me out. [15-Jun-2018 14:45:13 ...
0
votes
1answer
27 views

Stylesheet is getting removed/deregistered automatically

I've put some custom code in my active child theme's functions.php. I'm trying to enqueue some style on a admin page. However, a style enqueued in admin_enqueue_scripts hook gets automatically removed ...
0
votes
1answer
20 views

How do I isolate the reason a wordpress filter is not running?

I have a wordpress filter defined in my theme's single.php: header( 'X-Filter-1: here' ); add_filter( 'the_content', function( $content ) use ( $details ) { header( 'X-Filter-2: here' ); /...
0
votes
0answers
14 views

Debug info from request handler

I'm adding custom request handler using add_action and register_rest_root. Sometimes it's hanging and I'm stuck without any output. I would like to use something like echo "Label"; to debug my code. ...