Questions tagged [debug]

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

Filter by
Sorted by
Tagged with
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
1answer
1k views

Move product attributes after summary on single product page

I must say i don't know coding or programming. I did copy paste this code, inside my functions and it is working perfect. The code shows all the woocommerce product attributes after the product ...
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
39 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
813 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
97 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
701 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
523 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
129 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
103 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 ...
0
votes
1answer
42 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
0answers
201 views

Can't show debug even after modifying wp-config

I added this to my wp-config file: /** * For developers: WordPress debugging mode. * * Change this to true to enable the display of notices during development. * It is strongly recommended that ...
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
133 views

how to error_log(wp_login_url())

I am trying to confirm if a filter I have applied has changed the wp_login_url to the correct address. I just want to print out the result of wp_login_url somewhere I can see it. if ( has_shortcode( $...
0
votes
1answer
260 views

I'm hit with: undefined constant register_sidebar. Once in debug mode? [closed]

I'm attempting to test my theme and I switched my config to debug true and I'm now hit with "Notice: Use of undefined constant register_sidebar - assumed 'register_sidebar'" I'm struggling to fix and ...
0
votes
1answer
17 views

How do I issue a warning in a wordpress plugin?

I'm trying to debugging a plug in that's misbehaving. I don't have a good setup for debugging and developing wordpress, so I just want to output the values of some variables to the rendered page. Is ...
0
votes
1answer
563 views

Debugging WordPress with xDebug

Until now I was using a local WordPress project and I was able to define the xDebugger in the php.ini file, it's very useful and helpful. But now I'm connected to a remote server and I only have the ...
0
votes
0answers
41 views

How to find the function which is outputting Array

I'm calling a plugin (Event Rocket) from a template and the output is mostly as expected but seldom the only thing that is displayed is "Array". I have consulted the plugin's makers and they have no ...
0
votes
0answers
34 views

Formatting wordpress debug messages

On my local PC (win 8 & IIS) when I get a wordpress debug message I get a nicely formatted table at the top of the page with a full stack trace. When I enable debugging on my linux hosting I just ...
0
votes
1answer
51 views

Method 'post_title' not found in class.

I'm running some code through phpStorm and am getting an error: Method 'post_title' not found in class. at this line: echo $post->post_title(); Is that phpStorm getting things wrong or am I ...
0
votes
1answer
22 views

Plugins effecting layout & login

I've been working on this issue by myself for a week, and I feel like I'm at my wit's end. Need some advice on what to try next. The issue is that my site has the white screen of death (no login) ...
0
votes
1answer
2k views

wp_enqueue_script was called incorrectly… i want to work with debug on

i know that this error is just a notice: notice: wp_enqueue_script was called incorrectly. scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, ...
0
votes
0answers
51 views

How to find which plugin crashes

I use wordpress version 3.8.3 and as many times as i tried to update wp the site crashes. Probably it's due to plugins. Am trying to find a way to learn which plugin causes this confliction but i don'...
0
votes
1answer
50 views

How can I turn off WP_DEBUG_LOG messages coming from a specific plugin or theme?

This is a seemingly simple question... I was wondering if anyone knows how to turn off WP_DEBUG_LOG messages coming from a specific plugin or theme? This assumes define('WP_DEBUG_LOG', true); in wp-...
0
votes
1answer
88 views

Debugging WordPress

Looking for advice on debugging sql queries. I find that plugins and themes are causing heavy queries and slowing performance. Any easy ways for doing this? Tools? Shortcuts? Thanks! Daniel
0
votes
1answer
80 views

Blank sign in page

I have a serious problem with my wordpress site. When I try to enter into my wp-admin page, I get blank page. I tried every solution possible including: deactivate plugins, update to higher wordpress ...
0
votes
0answers
42 views

Debugging Missing Elements in Taxonomy

I'm trying to debug an issue and I was hoping I could get some direction. With the same exact taxonomy page template, one of the pages is missing the sidebar and the WP admin bar (logged in), while ...
0
votes
1answer
110 views

Theme parts path location dump

Few months back I was working on customizing theme that I was assigned to. I remember that I used some function or define something in the config or theme functions file and than it displayed debug ...
0
votes
1answer
881 views

loging to Admin page not working at all

I'm trying to log-in to the admin page of my website without any luck, only i got white page, hers what i did to identify the problem: I have enabled the Debugging in wp-config.php // Enable ...
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
472 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 ...
0
votes
1answer
702 views

Changes to WordPress database using phpMyAdmin not reflected on blog

I am updating my database using the phpMyAdmin UI and the changes are not reflected on the WordPress blog. The reason for doing this is when some changes were made recently to the blog the site hanged ...
0
votes
1answer
510 views

Accessing Variables Used In a Plugin Using PHPStorm + XDebug

I'm currently attempting to use XDebug 2.2.1 and PHPStorm 7.1 to debug my WordPress plugin. So far, I've successfully installed XDebug and breakpoints are working fine. However, I'm unable to access ...
0
votes
0answers
60 views

Strange behaviour using 3.8.1

I have upgraded some of my blogs into 3.8.1 and I am experiencing a strange behaviour. I have created in the past two types of themes that use mostly the same mechanism, assigning page templates. The ...
0
votes
1answer
192 views

Fatal error after changes to functions.php, even with original file

Getting Fatal Error: Cannot redeclare theme_feature_setup() message after code changing in the functions.php file. I've tried deleting functions.php file and uploading the previous version but I still ...
0
votes
0answers
118 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
1answer
104 views

What tool are available in the wordpress API for debugging a plugin?

I am very new to plugin development. I have created my first plugin but when I activated it, it caused the majority of every page on the site to stop being generated. I have echoed something from ...
0
votes
0answers
37 views

Queries gone haywire since update to 3.8.1 [duplicate]

I have a WordPress install on a dedicated server with decent memory (upwards of 8GB) Since upgrading to 3.8, I started getting mysql disconnects/timeouts, better known as MySQL server has gone ...
0
votes
0answers
374 views

Console shows ReferenceError: jQuery is not defined, no clue why!

I just installed FirePHP to help with debugging in WP, but for some reason all it shows is ReferenceError: jQuery is not defined. I have some jquery stuff on the page that seems to be working just ...