Questions tagged [debug]

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

76 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
36 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
195 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
36 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
554 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
554 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
25 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
27 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
568 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
427 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
242 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
369 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
14 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
22 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
81 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
64 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
160 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
44 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
128 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
371 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
246 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
487 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
66 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
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
135 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
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
37 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
87 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
809 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
38 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
41 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
36 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
94 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
699 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 ...
0
votes
0answers
64 views

Wordpress slow even use blank template

I am working on a wordpress based website,while I found that it is too slow for loading the page itself(without the static resources), the TTFB of the request for a post is almost 1.7s in case of ...
0
votes
0answers
518 views

Stripe button is not working in a template page

I have integrated stripe into my website and when I tried adding stripe to a theme template file I keep getting this error: "The Stripe Token was not generated correctly". I can't comprehend why it's ...
0
votes
0answers
125 views

I'm writing my first plugin and my echo output is showing up on every page of my wordpress installation

I'm using echo and print_r to help with debugging and the output is showing up everywhere. I am using wp_cron and $wpdb as well as regular sql queries. Any idea on why this is happening? I have ...
0
votes
0answers
54 views

Unable to load Posts list & Getting error 500 error

List of Posts & Events doesn't load. Can't publish new either. Pages work fine. There was another error too which are now ignored using this: https://stackoverflow.com/a/32860981/1463443 I tried ...
0
votes
1answer
102 views

Weird bug regarding the_excerpt()

I'm experiencing a very odd bug while using the_excerpt() function and I have no where else too look so thought I'd see if anyone had any ideas. I'm using the_excerpt(), on a post, like this; And in ...
0
votes
1answer
1k views

Admin sometimes redirects to HTTPS

I have multiple Wordpress installations hosted at Hostinger. Sometimes, when I save a post or, as happened right now, just tried to access wp-admin, it redirects me to HTTPS version of the website. ...
0
votes
1answer
61 views

How to debug theme (Theme is causing pages to have no style or HTML <head> section)

I have a WordPress theme given to me by a client, so not familiar with it at all. Activating the Twenty Sixteen theme resolves the problem, so it's not a plugin but definitely the client's theme. ...
0
votes
0answers
56 views

Unnessary character on post after restore

Recently i restored the wordpress post . Now I am getting so much problem with it. In post there are unknown characters like  like you can see in There are othermany such character. I actually ...