Questions tagged [wp-debug]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
0answers
32 views

Do I put define( 'WP_DEBUG', true ); after 'wp_;/* then before "Thats all, stop editing

I know I must put define(WP_DEBUG', true); before "Thats all, stop editing, but now I see 'wp_';/* just before that. Do I use that 'wp_';/* in my code and leave out define for example, or do I ...
0
votes
0answers
17 views

notices and warnings displayed with WP_DEBUG false

My WordPress sites suddenly started displaying notices and warnings publicly. even when WP_DEBUG is set to false. Even when I set it to true I normally do WP_DEBUG_DISPLAY false. Either way, sites are ...
0
votes
0answers
31 views

WordPress Error Message

I am getting below error message in debug.log file. [19-Jun-2021 14:12:52 UTC] PHP Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s ...
1
vote
0answers
40 views

Has WP 5.7.2 possibly changed the email process, specifically, does anyone know where to find a list of PHPMAILER_EXCEPTION_CODES? [closed]

Been using a Form plugin for several years (forms haven't changed for some time) and up until recently these forms have been fully functional ... specifically ... they are supposed to send both a ...
0
votes
1answer
34 views

website has a bug

Wordpress website Red Bug shown in top line, I have an error message: NOTICE: wp-includes/functions.php:5313 - WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To ...
0
votes
1answer
57 views

There is no any line related the error but it says critical error

My website says critical error on website after add my custom code but there is no any line related my custom code in log file.There are only 2 repater lines and they are standard for my website, not ...
0
votes
0answers
12 views

What is the lowest hook deal with database?

I need to track every process done on the database, so what is the lowest hook applied to the database processes?
1
vote
0answers
13 views

WP_DEBUG must be on, otherwise edit post or page will show 404 error

encountered a very strange error: my WP_DEBUG must be on (set to true), otherwise editing post or page at the admin panel will show the 404 error. While the save post/page can still be seen. The ...
0
votes
3answers
61 views

Why does WordPress keep showing me error messages?

I'm trying to hide error messages on a WordPress installation on a shared hosting. I added the following code to my config. ini_set('display_errors','Off'); ini_set('error_reporting', E_ALL ); define('...
1
vote
1answer
51 views

Wordpress: Adding Security

Regarding this answer, is correct to add the file debug.log in this way? RewriteRule (?:debug|readme|license|changelog|-config|-sample)\.(?:php|md|txt|html|log?) - [R=404,NC,L] Kind Regards
1
vote
1answer
418 views

WordPress customizer Preview not loading

I'm creating a WordPress website, today I have tried to add some new features but I'm not able to add because customizer live preview is not loading I have done some steps Update all theme and plugin ...
0
votes
1answer
512 views

error log is going to the wrong location, WP_DEBUG_LOG is ignored

My WordPress error log is going to /var/log/php-fpm/www-error.log. That's not where I want it. In fact, it took me too long to figure that out. (I'm new to WP and PHP). I've tried to redirect it with ...
0
votes
0answers
518 views

How to display only PHP (Fatal) Errors in debug.log? No notices, warnings, etc

I can't find the right way to make it work. I tried many things, like putting this in wp-config.php define('WP_DEBUG', true); define('WP_DEBUG_DISPLAY', false); define('WP_DEBUG_LOG', 'wp-content/...
0
votes
0answers
49 views

Wordpress not writing error.log

My local development WordPress install on ServerPress is not writing error logs. I made changes to my wp-config.php file to enable error log writing for WordPress, and also tried editing the php.ini ...
1
vote
0answers
62 views

PHP-FPM Wordpress Debug

Is there any way to get WP_DEBUG to log errors when running PHP-FPM? define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); define( 'SAVEQUERIES', true );
1
vote
1answer
105 views

How to show the error causing the 'There has been a critical error on your website'?

I'm getting the error: 'There has been a critical error on your website. Learn more about debugging in WordPress.'. How do I display which error I'm getting in the frontend? I have these three lines ...
1
vote
1answer
403 views

Wordpres debug.log PHP Notice: is_singular was called

I have started to get alot of "is_singular was called" and "is_page was called" in my debug.log [31-May-2020 12:10:27 UTC] PHP Notice: is_page was called <strong>incorrectly</strong>. ...
0
votes
0answers
193 views

How do I specify where to save the debug.log?

According to the documentation cited below I should be able to add a path to save the debug.log at but it does not seem to be working for me. https://wordpress.org/support/article/debugging-in-...
0
votes
1answer
12 views

I have this error notice 'wp_enqueue_script was called incorrectly' in my plugin

I have read all the previous posts about this but can't seem to get my head around what is wrong with my code. This is in a plugin that I have written. I thought I had it sorted but looks like I haven'...
1
vote
1answer
465 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
5answers
1k views

Warnings even when the WP_DEBUG set to false

The link https://vreqenz-stream.de/shop/ throws warning when opened on some devices and not on others. I thought it may be a cahce issue but I have cleared cache from WP-rocket and also browser. Just ...
0
votes
1answer
466 views

Is it possible to enable and disable wp debug from functions.php?

I want to make 'WP_DEBUG' true or false from functions.php. Is it really possible?
1
vote
3answers
3k 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 ...
1
vote
1answer
344 views

Same log message keeps on printing to debug.log file thousand of times

So i was debugging my PHP code while working with Wordpress site by writing to debug.log with error_log($message) or trigger_error($message). My message in these log statements keeps on printing ...
0
votes
1answer
439 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
0answers
149 views

admin_post_(action) hook create console log error

In latest WordPress if web page has <input type="hidden" name="action" value="action_name"> input field with name=action then it create console log error. But this happen maybe 4.9.5/6. However....
1
vote
1answer
85 views

List $wp_admin_bar menu items (debug)

I would like to dump the content of the $wp_admin_bar object in order to remove some menu items with the remove_menu() method. What is the suggested way to do it without printing anything on the ...
6
votes
1answer
12k views

Debug.log file is never created?

It's the first I have seen this. In a project I'm working on, I tried to switch on the debug mode for wordpress to see logs. Even if I activate the debug_log in wp-config.php, debug.log file is never ...
0
votes
0answers
227 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
1answer
1k views

Using debug log in production, is that a security concern?

Is having the WP_DEBUG_LOG enabled, and having a debug.log in a production environment a security issue?
2
votes
1answer
508 views

What does this message from WP_DEBUG mean?

I have been having server 500 errors on 3 separate WordPress websites over the last while. (The problem BTW does seems to be related to the wordpress_logged_in***** cookie because deleting that always ...
0
votes
1answer
1k 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 ...
3
votes
1answer
2k views

How to debug when error_log not working as expected

Trying to debug my development and running into a lot of frustrations with lack of output in the debug.log. For example, I have this defined in wp-config.php: define( 'WP_DEBUG', true ); define( '...
0
votes
0answers
1k 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 ...
2
votes
1answer
6k views

Inserting Post Using wp_insert_post. How to Fill Yoast Plugin SEO Fields

I am inserting posts into a database using wp_insert_post function once the post is inserted using below line of PHP $postId = wp_insert_post($array) I can insert values in my advanced custom fields ...
6
votes
1answer
4k views

Suppress deprecated notices

When I use: define('WP_DEBUG', 1); In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices. My understanding is that adding this: ...
3
votes
2answers
3k views

Where should I tell WordPress where error_log messages should be written?

I have two different instances of the same server (one for development, one for deployment), built independently but basically the same (same OS, same WordPress version, same content etc.). However, ...
0
votes
2answers
4k views

"Undefined index" error when saving empty array with checkboxes

In my plugin settings page, I have a list of checkboxes that store the value into an array. While the it works as expected, whenever I uncheck all of the checkboxes and save those changes I get the ...
1
vote
3answers
6k views

Undefined constant with debug set to true

I have used to following code to change the location of 'single' Wordpress templates. define(SINGLE_PATH, TEMPLATEPATH.'/single/'); add_filter('single_template', 'lsmwp_custom_single'); function ...
0
votes
0answers
57 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 want ...
4
votes
3answers
15k views

How to debug vars inside function at functions.php file?

I have this function: function wpse_210493_apply_advertising_position( &$posts, $return = false ) { $ad_posts = array(); $content_posts = array_filter( $posts, function ( ...
10
votes
1answer
9k views

How to check if debug is true and can I use it for my own code? [duplicate]

I'm needing to debug one of my themes and I want to be able to switch on a debug mode so I can output more information or switch off debug mode and not see any information. I noticed there is a ...
1
vote
1answer
3k views

How to fix Uninitialized string offset: error on a checkbox in WP Settings API

I am trying to create an options page with a checkbox field. The checkbox is working fine but when I uncheck it and save settings, an error string shows on Notice: Uninitialized string offset: 0 in ...
0
votes
1answer
48 views

Debugging conundrum with a problem fixed by enabling WP_DEBUG

I've got a site that has a plugin that causes problems with the admin-ajax.php file to have 500 internal errors when its turned on. The plugin causes this issue in the ajax file even on pages of the ...
0
votes
1answer
3k views

Which language files are loaded?

Is there a way to print a list of the loaded language files for debugging reasons?
0
votes
2answers
138 views

Style WP_Debug?

Is there any way to style the message delivered by wp_debug? Whenever I set WP_Debug to true, it pushes all my content down the page. While I admit it's easy to just set it back to false after using ...
2
votes
1answer
2k views

Prevent wp_debug from polluting ajax within plugin

I've ran into an issue here where wp_debug notices foul up my ajax response. The codex suggests using ob_clean just before returning or echoing: To parse AJAX, WordPress must be reloaded through ...
0
votes
1answer
38 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
112 views

How do I set up Debugging?

In my wp-config.php, I have: // Enable WP_DEBUG mode define('WP_DEBUG', true); // Enable Debug logging to the /wp-content/debug.log file define('WP_DEBUG_LOG', true); // Disable display of errors ...
0
votes
1answer
699 views

Disable Debug Log Programmatically

I'm trying to disable WP_DEBUG_LOG if and only if debug.log exists. I'd like to hook into wp_footer and test if the file exists and if so disable my debug log. All I've found though is that ...