Questions tagged [debug]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
87 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
161 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
168 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
122 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
297 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
59 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
744 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
136 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
28 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
719 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
88 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
170 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
510 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
36 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
8k 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
624 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
962 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
47 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
399 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
122 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
658 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
0answers
8 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
7 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
18 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
57 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
22 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
1answer
52 views

xdebug connects but won't break in WordPress with vvv

I am using vvv for local WordPress development and cannot get xdebug to pause on breakpoints. I have ssh'ed in and set the xdebug_on command. phpinfo() shows xdebug installed and active phpinfo() ...
0
votes
0answers
35 views

Why am i not Getting Install Prompt in PWA

I implemented PWA for my static site. service worker register successfully and my page is also working in offline as I expected but the real problem is in add to Home screen I included manifest.json ...
0
votes
2answers
67 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
34 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
94 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
339 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
185 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
403 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
57 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
25 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. ...
0
votes
0answers
126 views

Notice: Undefined index: post_title error

This is my code: function insert_custom_post_test($args){ $args['post_content'] = ''; $args['post_status'] = 'publish'; if($args['post_title'] == 'test_title'){ // Code ...
0
votes
0answers
89 views

SyntaxError: unterminated string literal - if Wordpress Debug in wp-config is set to true

To clear up my notices in my Wordpress Shop (with Woocommerce) i set WP_DEBUG to true in my Wordpress wp-config file define('WP_DEBUG', true); Now im getting the following error in my firebug ...
0
votes
1answer
1k views

Move product attributes after summary on single product page

I must say i don't know coding or programming. I did copy paste this code, inside my functions and it is working perfect. The code shows all the woocommerce product attributes after the product ...
0
votes
0answers
31 views

Debugging Mysterious PHP Addition

I am running a current version of Wordpress using a custom Roots/Sage theme. The other day in production, a full line of PHP containing move_uploaded_file was inserted to the top of lib/customizer....