Questions tagged [debug]

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

85 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
39 views

Is it possible to set another language for debugging messages?

The site language is defined as Hebrew. So I get translated error messages. It's a terrible thing. It is difficult to understand, it is difficult to search on Google, the directions of the text are ...
3
votes
1answer
197 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
0answers
46 views

WordPress debug.log is not updating

In my wp-config.php file: define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', true); @ini_set('display_errors',1); In my php.ini file, track errors is = Off /wp-...
2
votes
0answers
566 views

Plugin could not be activated because it triggered a fatal error. (No Error??)

I am having the error while trying to activate a plugin. "Plugin could not be activated because it triggered a fatal error." I set WP_DEBUG true from wp-config.php file, but there is no other ...
2
votes
1answer
634 views

How to make debug.log timestamps local time?

I look at the debug.log file a lot while developing, and having all the timestamps in UTC drives me crazy! How can I get them to display in local time? I have my php.ini 'date_timezone' value set to ...
2
votes
2answers
1k views

Send specific users an email when posts are published

I've got the following code, which is supposed to run when a new post is published for the first time, check if a custom field 'specific_users' has data (this uses Advanced Custom Fields), and if so, ...
1
vote
0answers
13 views

WordPress Multi-site network tab throwing 'Error too many redirect errors'

Has anyone come across this issue.. whenever I try to access the /network section of my multisites it doesn't work which just started recently. It throws a ERR_too_many_redirects error and just shows ...
1
vote
0answers
330 views

Error message prevents access to WP

This message appears Attempt to create object of class W3TC\DbCache_WpdbNew has been made, but file /home/***/wp-content/plugins/w3-total-cache/DbCache_WpdbNew.php doesnt exists #0 ...
1
vote
0answers
27 views

How to debug my custom login form looping intermittently

I have a custom log in form for users of my website where they can log in then view some information that related to them. The problem is sometimes this form will loop. I will get the message "login ...
1
vote
0answers
171 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=...
1
vote
0answers
29 views

Disappearing articles, autodeleting themself?

I'm not sure what's going on. I don't post very much lately, but the first weird thing happend when an article just disappeared. Today I was moving around my wordpress site. At some point, the last ...
1
vote
1answer
651 views

map_meta_cap was called incorrectly error?

This is a very odd error that I haven't been able to find the underlying cause of or the solution yet. Errors showing in various places within the WP Admin; Notice: map_meta_cap was called ...
1
vote
1answer
432 views

Dumping variable in custom pre_gets_post function in functions.php, returns NULL

Problem Summary: I am using firePHP to analyze my variables in a custom function, but it does not display their contents into the console as I would expect. I also used var_dump(), it returns NULL. ...
1
vote
0answers
3k views

Wordress debug log is not working

I have tried all recommendations from here but none solves my issue. I have a couple of wordpress installations on a local machine running Win 7 and wamp 2.4 and none of them writes in the debug.log ...
1
vote
0answers
245 views

How can I get a traceback on function calls?

I've been trying to make a search page, but I keep getting redirected back to the main site. I can't find anything useful in the log about why this might be happening. Is there a way I can enable some ...
1
vote
0answers
4k views

Unable to get WP_DEBUG, WP_DEBUG_DISPLAY, WP_DEBUG_LOG to work

I've got the proper debugging constants defined in wp-config.php: define('WP_DEBUG', true); define('WP_DEBUG_DISPLAY', true); define('WP_DEBUG_LOG', true); But they're not doing a darn thing. When I ...
1
vote
2answers
314 views

Getting notices on fresh 3.6.1 install

I'm a relative newcomer to WP. I've been playing around for the past 3 months or so trying out themes, plugins etc. About a month ago I got to the point where I turned debug on and I started seeing ...
1
vote
1answer
455 views

How do I fix this 'Undefined variable:' debug message?

The code below (which I use in functions) is from https://stackoverflow.com/questions/35263445/numeric-pagination-on-my-custom-category-page, and is showing a debug message of 'Undefined variable: ...
0
votes
1answer
18 views

How to display SQL query that ran in WC_Order_Query?

Using WP_Query you can do: (new WP_Query($arguments))->request to get the raw SQL code that was executed. But how can you do this with WooCommerces WC_Order_Query or wc_get_orders?
0
votes
0answers
25 views

Huge debug.log because of “undefined offset in media.php”

Recently debug.log (WP 5.3.2) grew to 17GB because of tons of entries like this: [17-Jan-2020 16:29:01 UTC] PHP Notice: Undefined offset: 1 in /wp-includes/media.php on line 790 [17-Jan-2020 ...
0
votes
1answer
164 views

Error on add_submenu_page() declaration

Was called incorrectly. The seventh parameter passed to an add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was ...
0
votes
0answers
37 views

How to trace errors in debug.log for WooCommerce 3.0?

I found a debug log error that states: price was called incorrectly. Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-load.php'), ...
0
votes
0answers
15 views

Debug a WP install: how to find which functions write post updates during a process (a woocommerce checkout in my case)

I hope this question is not too broad or not the right format. But the subject at hand is one of the vaguest: debugging. For the TLDR crowd out there, the actual question is in bold in the 'What I am ...
0
votes
0answers
9 views

How can I crawl through every page that wordpress generates and log any php error's that popup?

I'm looking to better automate testing of WordPress sites. Is there anyway to run a php script that crawls through every page that wordpress generates and log any php errors that popup into debug.php ...
0
votes
1answer
17 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
54 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
12 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
27 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
164 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
142 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
424 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
57 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
439 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
315 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
0answers
95 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
22 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
154 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
95 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
0answers
32 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....
0
votes
1answer
40 views

What is the correct entry point for capturing coverage data

I am on a mission to find out which plugins are used on a large wordpress installation. Furthermore i need to find out which parts of which plugin is used exactly. So i decided to record some code ...
0
votes
0answers
96 views

Debug WordPress gettext function

The gettex function: ('__') receives the original string, in spite of the fact that the po file has the translation of the string. It happens accidentally. Is there any method to find out the error?
0
votes
1answer
911 views

(Xdebug Profiler) Why are there two cachegrind files generated for one page?

When I enable xdebug profiler, open a page in admin, it generates two cachegrind files with almost identical name cachegrind.out.1498219635_761795.crown__minilio_wp-admin_edit_php cachegrind.out....
0
votes
0answers
43 views

Plugin debugging with errors in activation routine

I'm currently developing a plugin and have the following problem. When I have errors in the activation routine of the plugin, I don't get any errors displayed (after I activated the plugin). Instead I ...
0
votes
1answer
47 views

Wordpress seems broken when logged of

I'm workin on a quite simple WP site and have the following problem: When I'm logged in to my dashboard, the site works smooth and clean. As soon as I log out and try to access the site, I don't see ...
0
votes
1answer
37 views

Unable to write error_log output… but only from a certain function

The replace_uploaded_image() function works great! I know it works because when I login to WP Admin and upload an image, it does exactly what it is supposed to do. Furthermore, if I remove the ...
0
votes
1answer
176 views

Finding which functions were called

Is there a way to see a trace of the list of functions called when I go to a certain page? Say I click on the "Register" button on my Wordpress page. It will probably call a set of both inbuilt and ...
0
votes
1answer
205 views

Error on debug.log PHP Stric Standards and PHP notice

I'm getting this error on the debug.log but I don't know why. WordPress and all of the plugins are on their latest versions. So, I don't know if this is normal or no. PHP Notice: The called ...
0
votes
0answers
750 views

Cannot read property 'hasClass' of undefined(…) jquery-ui

I have in my console informations about some problems: [screen from browser console][1] It causes that I can't quick edit my post, I can't turn on screen option in admin panel, and drag&drop ...