Questions tagged [wp-debug]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
5answers
51 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
40 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?
0
votes
2answers
124 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
30 views

How I debug ajax checkout in woocommerce?

In my instalattion woocomerce I checkout form I have shipping method but when the order is save to databse in database I see another shipping method. How I debug ajax checkout in woocommerce?
1
vote
1answer
58 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
181 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
71 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
31 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 ...
5
votes
1answer
4k 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
133 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
407 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
479 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
61 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
691 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 ...
1
vote
1answer
3k 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 ...
2
votes
1answer
812 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
2k 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
2k 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
4k 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
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 ...
0
votes
3answers
6k 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 ( ...
8
votes
1answer
6k 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
813 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
41 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
2k 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
96 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 ...
0
votes
1answer
1k 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
37 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
92 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
463 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 ...
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 ...
0
votes
0answers
114 views

WP Debug set to true but still wsod

I'm trying to do my first wordpress plugin, and I've added this on my wp-config.php define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); but i still have ...
0
votes
2answers
4k views

Why does WP_DEBUG only work after wp_debug_mode() is called? [closed]

With debugging set to on, define('WP_DEBUG', true); my instance of WordPress doesn't show any debugging info. After a lot of searching I figured that after I call wp_debug_mode() debug info shows ...
4
votes
2answers
1k views

How to individually set WP_DEBUG on a sub-directory multisite?

According to this question, it's possible to turn on/off WP_DEBUG for specific sites on a multisite. Is it possible to do this with a sub-directory multisite?
1
vote
1answer
2k views

add_sub_menu page() to be replaced by add_theme_page()

While checking my theme with theme-check plugin, i found few errors which are listed below along with the line of codes where it displays those errors(REQUIRED:) to be fixed. REQUIRED: plugin-...
-2
votes
1answer
2k views

Wordpress Errors in generated by theme check plugin [closed]

Please help me in solving these warnings, in order to submit the theme for submission. Thanks in Advance. I have found many warnings and have solved many of them thanks to wordpress.stackexchange.com ...
-1
votes
1answer
523 views

TGM plugin error in Theme Check Plugin

Errors generated by theme-check plugin and with the code REQUIRED: plugin-activation.php. Themes should use add_theme_page() for adding admin pages. Line 335: add_submenu_page( add_submenu_page( ...
0
votes
0answers
935 views

Notice: Use of undefined constant - assumed ' '

I turned on debug mode and see the following in my header: Notice: Use of undefined constant - assumed ' ' I'm using the following function in header.php: <?php if ( is_user_logged_in() ) { ...
0
votes
1answer
412 views

Undefined index: id, when I save the options [closed]

I'm making a Wordpress theme and I get these 'Notices' repeated a lot of times when I save the options using the WP_DEBUG: Notice: Undefined index: id in /var/www/Seozeta/wp-content/themes/seozeta/...
0
votes
1answer
3k views

How to debug 'Notice: Undefined index' on a Request['action']

I use the next code in order to save the options of my theme (by using the Wp Settings API), but when I debug it, I get the 'Notice: Undefined index: action' error/notification. In order to fix it, ...
0
votes
2answers
169 views

Some ways to debug code

I have a BuddyPress installation with many custom code. I had everything ready for production until I moved my database to shared hosting. The problem is that in strange ocasions, all the activities ...
0
votes
1answer
166 views

Pick your brain on wp-config.php if statement for multisite

I am trying to write a if statement into the wp-config.php to only enable define('WP_DEBUG', true); if it's not the main site in a WordPress Multisite install. I just don't know how much of the ...
1
vote
1answer
2k views

Failed to open stream: HTTP request failed! in \wamp\www\wordpress\wp-includes\class-http.php on line 929

I'm writing a theme and almost every time I reload a page, WordPress is giving the following error Warning: fopen(http://localhost/wordpress/wp-cron.php?doing_wp_cron=1373799734....
6
votes
1answer
5k views

Control verbosity level of WP DEBUG?

I've been at a loss so far and so I thought I'd pose the question: Is there a way to modify the verbosity level of the WP debug.log via wp-config.php or elsewhere? Just an fyi, here is what I have in ...
0
votes
1answer
510 views

Undefined offset: 2

I'm using this function I found from this answer here about showing prev/next navigation for a current page <?php $pagelist = get_pages("child_of=".$post->post_parent."&parent=".$post->...
1
vote
2answers
1k views

Notice: Undefined index: suppress_filters

I'm doing some de-bugging on a theme I'm working on and I'm hoping someone can help me please. I used this function that Justin Tadlock made to display custom post types on the blog page and with wp-...
0
votes
1answer
11k views

Notice: Trying to get property of non-object in options.php

I am generating the following notice in my options.php when testing my theme in wp_debug mode. I can see where the problem is but do not know how to fix this issue? It seems the non object is being ...
20
votes
5answers
11k views

Define WP_DEBUG conditionally / for admins only / log errors (append query arg for all links?)

I'm developing a site on a server that the client has access to as well and what I'd like to do is show WP_DEBUG only for administrators. Referencing Yoast's article on a way around this: if ( isset($...
6
votes
1answer
2k views

Hide php Notices in Dashboard

When I program a theme, I put WP-DEBUG on. Which ensure a proper PHP code. Sadly most Plugin developers keep using non existing vars : echo $args['title']; Notice: Undefined index: title in /wp-...