Questions tagged [wp-debug]
The wp-debug tag has no usage guidance.
79
questions
0
votes
2
answers
69
views
Automated WordPress update failed to complete - but all updates fail with code -1
I have a WordPress website on my Ubuntu machine. I do use auto-updates and auto-updates for plugins. After I logged in recently I saw that a couple of plugins didn't update, as well as WordPress ...
0
votes
1
answer
45
views
Fatal error trace not shown in development setup
I recently re-did my local dev setup and have been seeing these types of fatal error warnings:
There has been a critical error on this website. Please check your site admin email inbox for ...
0
votes
0
answers
37
views
Many big issues in the website, WP_Debug not showing
I have this website https://itds.pl/ suddenly it started working really bad and I can't find the reason.
Website is Multi website system
Using WPML
Using ACF
Have two domains:
Main domain Eng and has ...
2
votes
2
answers
3k
views
Wordpress 6.x / PHP 8.x deprecated warnings in development environment
The problem:
I want to run Wordpress 6.x with PHP 8.x in development mode - meaning define('WP_DEBUG', true); but Wordpress 6.x partial support for PHP 8.x throws a lot of deprecated warnings which do ...
2
votes
1
answer
326
views
How do you change error reporting to only show errors in WordPress?
I'm working on a development site that has some plugins that produce notices. It's a bit annoying during development when you only want to see the errors your own code produces.
How can you turn off ...
0
votes
1
answer
45
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
1
answer
120
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 ...
1
vote
0
answers
19
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
3
answers
239
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
1
answer
55
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
1
answer
696
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
1
answer
1k
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 ...
1
vote
1
answer
1k
views
How to display only specific Error types 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/...
1
vote
2
answers
545
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
0
answers
133
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
1
answer
157
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
1
answer
741
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
0
answers
402
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
1
answer
25
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
1
answer
543
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
5
answers
2k
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
1
answer
813
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?
3
votes
3
answers
5k
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
1
answer
483
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
1
answer
535
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
0
answers
251
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
1
answer
101
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 ...
7
votes
2
answers
18k
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
0
answers
281
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
...
1
vote
1
answer
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
1
answer
518
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
1
answer
2k
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
...
4
votes
1
answer
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
0
answers
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 ...
3
votes
1
answer
7k
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 ...
10
votes
3
answers
10k
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
2
answers
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
2
answers
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
3
answers
7k
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
0
answers
58
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 ...
5
votes
3
answers
19k
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 ( ...
13
votes
1
answer
11k
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
1
answer
4k
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
1
answer
59
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 ...
1
vote
1
answer
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
2
answers
175
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 ...
3
votes
1
answer
3k
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
1
answer
41
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
1
answer
126
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
1
answer
872
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 ...