Questions tagged [errors]

Not all errors one encounters while working with WordPress are actually caused by WP. When asking about errors be as specific as possible. Just telling which error you get, is usually not enough to help you tracking it down.

Filter by
Sorted by
Tagged with
43 votes
8 answers
110k views

Cannot access non-wordpress subdirectories as wordpress overrides them with a 404 error

I refer to this question previously asked and not suitably answered: Wordpress overriding actual subdirectories and also Non "Wordpress" pages/code getting 404 error I have the same problem ...
Nicole's user avatar
  • 431
33 votes
7 answers
82k views

wp_enqueue_script was called incorrectly

I don't know how but now I am getting this error : Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, ...
raiden's user avatar
  • 339
31 votes
7 answers
37k views

Add validation and error handling when saving custom fields?

I have a function that defines a custom field on a post type. Say the field is "subhead". When the post is saved, I want to do some validation on the input, and display an error message on the post ...
MathSmath's user avatar
  • 5,578
27 votes
5 answers
52k views

Showing errors with $wpdb update

I am using $wpdb->update to update a custom table I have in my database. When I var_dump the result it returns: int(0) So I tried $wpdb->print_error() to see what's wrong. However, it shows ...
Jarred's user avatar
  • 498
21 votes
12 answers
61k views

Remove type attribute from script and style tags added by WordPress

Warning: The type attribute is unnecessary for JavaScript resources. From line 10, column 146; to line 10, column 176 feed/" /> <script type="text/javascript">window ...
WordCent's user avatar
  • 1,867
21 votes
6 answers
40k views

WP_DEBUG is not set, but I'm still getting warnings

If WP_DEBUG is not set, as I understand it, you should never ever see warnings. But on some sites on some servers, I'm still seeing a few. Not all the warnings that would be displayed if WP_DEBUG was ...
user avatar
21 votes
3 answers
39k views

How to catch/what to do with a WP Error Object

I am running some of the WP functions directly inside a plugin, including wp_insert_post(), if something goes wrong, this returns a WP Error object, what is the correct method to catch this error? ...
Dunhamzzz's user avatar
  • 685
21 votes
1 answer
34k views

Change login error messages

took a look at the questions but I couldn`t find a similar one. I need to change the custom error messages that are displayed when user tries to login with a wrong username or password. Like, change ...
Vitor Argos's user avatar
18 votes
3 answers
29k views

Error: Declaration of MyClass::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl()

I'm currently working on a WordPress site and whenever in the admin I go the Appearance > Menus page I get the following error: ErrorException: Runtime Notice: Declaration of Walker_Nav_Menu_Edit::...
Luke's user avatar
  • 581
18 votes
10 answers
74k views

An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration

I'm running WordPress on a localhost WAMP server and whenever I go to "Plugins" or "Dashboard > Updates" or even to "Dashboard" nothing loads (no WordPress news, no updates, and I'm not able to search ...
Paul's user avatar
  • 2,150
15 votes
4 answers
15k views

WP-CLI - Selecting PHP version

On a development server I have a co-install of PHP 5.6 & 7; nginx is configured with PHP 5.6. When I type "wp" it returns several errors and at the end of the error is a message containing the ...
j03's user avatar
  • 177
15 votes
1 answer
107k views

Why $wpdb->show_errors() and print_error() is showing an output even if the query output is correct?

In order of figuring out the following issue, see https://wordpress.stackexchange.com/questions/178995/sanitize-a-working-query-string-by-using-wpdb-prepare-fails-with-mysql-db-er i ran into an rather ...
rkoller's user avatar
  • 634
15 votes
1 answer
6k views

How to disable the fatal error (WSOD) protection?

The fatal error handling was introduced in WordPress 5.1 and 5.2. It's sometimes referred to as the White Screen Of Death (WSOD) protection. When working on dev/local installs, we sometimes want to ...
birgire's user avatar
  • 67.1k
14 votes
2 answers
28k views

Get error messages when $wpdb->insert() returns false?

$wpdb->insert() returns false which I've learned means that the insert failed. Now, I would like to know why it fails with the insert. According to this ticket https://core.trac.wordpress.org/...
Peter Westerlund's user avatar
14 votes
6 answers
49k views

No Error Log File, no debug info

My error when writing a plugin for uploads and yes, I can debug. But it just jumps directly from this line to destruct the end of my wp-config.php EDIT: // Enable WP_DEBUG mode define('WP_DEBUG', ...
Toskan's user avatar
  • 514
14 votes
2 answers
16k views

Detecting errors generated by $wpdb->get_results()

How do I detect errors when using $wpdb->get_results()? For example: $result = $wpdb->get_results("SELECT * FROM this is not a valid query"); The preceding code doesn't generate any exceptions ...
rinogo's user avatar
  • 1,441
13 votes
5 answers
16k 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: ...
Chris Pink's user avatar
12 votes
3 answers
29k views

error_log() output for print_r() appearing on page

I am trying to debug a plugin and am using error_log() in various places to see what various things are. I am using the following: error_log( print_r( $variable ) ); When I look at debug.log, all I ...
Cedon's user avatar
  • 1,659
11 votes
5 answers
124k views

Error: call_user_func_array() expects parameter 1 to be a valid callback

I have issue after upgrading my wordpress to 3.6 see below for errors which displays on wordpress admin panel not on front of website. Warning: call_user_func_array() expects parameter 1 to be a ...
Sufalamdev's user avatar
11 votes
2 answers
7k views

Should I use spl_autoload_register() in my plugin?

When I use spl_autoload_register in my plugin, I get: Fatal error: Uncaught exception 'LogicException' with message 'Class wp_atom_server could not be loaded' wp-includes\pluggable-...
johnny's user avatar
  • 319
10 votes
6 answers
4k views

What are the best practices for updating?

Don't want to do anything to take down my blog. Here are some upgrade-related questions: How often should Wordpress be updated? What is the best way to do it? How to know if there is a problem with ...
B Seven's user avatar
  • 281
10 votes
2 answers
18k views

Error "Trying to get property of non-object" with Custom Walker for wp_nav_menu

I am trying to add some ARIA related stuff to the wp_nav_menu function. I use a custom walker class for this purpose: class Walker_Nav_Menu_With_Aria extends Walker_Nav_Menu { function ...
Rudolf's user avatar
  • 218
10 votes
3 answers
7k views

'Password field is empty' error when using autofill in Chrome

When I open the login screen on Chrome, the browser automatically fills the form with my username and password. However, when I hit the submit button, I get the following message: ERROR: The ...
Robbert's user avatar
  • 656
10 votes
2 answers
1k views

Is there a plugin that will override the "Error establishing a database connection" message? [closed]

My provider's database server recently had some downtime and my site was displaying the classic "Error establishing a database connection" message for about an hour. I knew what the problem was but ...
BigglesZX's user avatar
  • 103
10 votes
1 answer
6k views

WordPress 6.1.1 shows deprecated errors with PHP 8.1 & 8.2

Is it related to my server or it is WordPress's error with PHP8.1 and PHP8.2? I see same error for both versions. Should I ignore the errors by setting wp-config.php as: define( 'WP_DEBUG_DISPLAY', ...
doraemon's user avatar
  • 213
9 votes
3 answers
5k views

How should one implement add_settings_error on custom menu pages?

The Professional WordPress Plugin Development book explains in detail how to properly use the Settings API, and it also demonstrates how to add Menus and Submenus, but unfortunately it doesn't provide ...
jnthnclrk's user avatar
  • 1,825
8 votes
5 answers
20k views

How to eliminate weird 404 errors in wp-admin?

I run a WordPress site with about 70 active plugins. Every so often, I'll get a random error page ("Not Found", though I haven't checked the headers to see if it's a 404) on a /wp-admin/ ...
dgw's user avatar
  • 359
8 votes
2 answers
10k views

Undefined offset: 0 in > [...] /wp-includes/capabilities.php on line 1067

Hey I get this error messages on my localhost setup, but only with the Genesis Framework enabled; WordPress Twenty Eleven works fine. This happens when I want to create a new post. If I refresh the ...
James Mitch's user avatar
8 votes
1 answer
6k views

Setting 404 page in Nginx

I am using this page (http://wiki.nginx.org/WordPress) to setup my WordPress on a nginx/php-fpm server. Everything is okay, except the 404 page When I request www.example.com/foo, it send me the ...
Yoga's user avatar
  • 909
8 votes
2 answers
36k views

What log files does a WordPress installation write to?

When tracking down WordPress problems, I've had a hard time finding where WordPress sends errors to. Where does WordPress send errors by default? Are there multiple files that different kinds of ...
Wesley's user avatar
  • 237
8 votes
1 answer
2k views

Why do I get the timeout warning?

I turned on debug mode in WordPress and the first request of the day I get this error: Warning: http_request() [function.http-request]: Timeout was reached; Operation timed out after 1000 ...
tooshel's user avatar
  • 1,427
8 votes
2 answers
2k views

Loading external page template and enqueue script from plugin causes 403 forbidden error

I have a plugin, which creates a panel on following page: mysite.com/wp-content/plugins/myplugin/includes/mypanel.php I want to use this panel on following page mysite.com/mypanel Solution that I ...
HOY's user avatar
  • 291
8 votes
2 answers
2k views

When to use Exceptions vs Error Objects vs just plain false/null

I'm in the process of writing a plugin and I'm trying to gauge when to use different approaches of handling errors. There are three methods I'm considering: Throwing an Exception (custom class) ...
Doug Wollison's user avatar
8 votes
5 answers
41k views

Unable to locate WordPress Content directory (wp-content)

I have tried to update my plugins in wordpress-admin but for some reason i am receiving an error "Unable to locate WordPress Content directory (wp-content)" I have checked on my server and the folder ...
T2T's user avatar
  • 81
7 votes
9 answers
56k views

WordPress Redirecting to wp-admin/install.php

Am working on my WordPress site. I changed font color of my site then I have refreshed my page but it redirects to wp-admin/install.php. What can I do now? How can I get access to my site?
user3013043's user avatar
7 votes
4 answers
11k views

HTTPS leads to Sorry, you are not allowed to access this page

I have a fresh Wordpress installation that works fine. I decide to make it work under HTTPS so I go in the General config and change the "Wordpress Address" and the "Site Adress" from http://my....
Fred's user avatar
  • 71
7 votes
2 answers
6k views

Validation error: Extending Gutenberg gallery block

I am trying to extend the Gutenberg core/gallery block to add some new functionality to my image gallery on the frontend. I have created a separate plugin to handle this task. I have registered my ...
Andreas's user avatar
  • 331
7 votes
2 answers
25k views

Could not create directory /wp-content/upgrade/

When I try to automatically install updates to Wordpress or plugins, I receive an error: An error occurred while updating... Could not create directory .../wp-content/upgrade/... My web host ...
Steve's user avatar
  • 1,707
7 votes
3 answers
15k views

Notice: Undefined index: host in /var/www/html/wp-includes/canonical.php on line 445

After changing siteurl ,home url form database it shows 3/4 errors called Notice: Undefined index: host in /var/www/html/wp-includes/canonical.php on line 445 Notice: Undefined index: scheme ...
Mehedi_Sharif's user avatar
7 votes
1 answer
12k views

Getting the warning: Missing argument 2 for manage_posts_custom_column()?

I created a custom post type, two custom taxonomies and displayed them in the 'manage post section, but I'm getting the following warning: Warning: Missing argument 2 for ...
wyc's user avatar
  • 3,867
7 votes
2 answers
4k views

Customize WordPress>Error Page

Is there a way to customize the WordPress>error page template so that the user isn't shown just a blank screen with text? I'm not talking about 404, but when WordPress displays an error. I'd like to ...
elke_wtf's user avatar
  • 423
7 votes
3 answers
22k views

Displaying PHP Errors from admin-ajax.php

We've got some custom endpoints set up that do various things, which we access via /wp/wp-admin/admin-ajax.php?action=some_action However whenever there is an error as we're developing, such as ...
owenmelbz's user avatar
  • 171
7 votes
2 answers
4k views

How to display admin error notice if settings saved succesfully?

Title sounds counter-intuitive but bear with me. :) I have options page, made with Settings API. When user enters invalid data I want to display error notice with add_settings_error() call. But! To ...
Rarst's user avatar
  • 99.7k
7 votes
3 answers
15k views

Connection lost. Saving has been disabled... (Updating Posts/Pages)

I've been developing for Wordpress for a few years now without any trouble on an old XP/WAMP development server (v1.7.4) but recently have been getting the error "Connection lost. Saving has been ...
user48973's user avatar
7 votes
1 answer
2k views

Wordpress 5.5 - ReferenceError: commonL10n is not defined error

I just upgraded to the latest version of wordpress 5.5 and my theme stopped working. The categories are no longer automatically selected when I click the button. https://prnt.sc/u030gj
Vincenzo Piromalli's user avatar
6 votes
1 answer
41k views

PHP Catchable fatal error: Object of class WP_Error could not be converted to string

I need help with this: PHP Catchable fatal error: Object of class WP_Error could not be converted to string in /hosting/www/ortopediairati.es/public/wp-content/themes/irati/rt-framework/...
Sergi's user avatar
  • 63
6 votes
4 answers
51k views

How to fix "There has been a critical error on your website. Please check your site admin email inbox for instructions"?

When I update my page I see this error and I tried to fix it but that didn't work. I removed all plugins and checked but it was still not fixed. Then I removed all themes and installed another theme ...
x doctor's user avatar
6 votes
6 answers
19k views

How to work around "that email address has already been used" error?

The following error may occur if a previous registration remains pending with a conflicting email address. That email address has already been used. Please check your inbox for an activation ...
here's user avatar
  • 326
6 votes
3 answers
5k views

Resetting comment count

Recently, I had to move to another domain and had to recreate all my MySQL tables on the enw server. I noticed that for some posts, the number of comments is doubled. Example - http://inversekarma.in/...
GPX's user avatar
  • 327
6 votes
5 answers
13k views

Troubleshooting a "You do not have sufficient permissions to access this page" error

I have a multisite installation running WP 3.5. My main site and a few other blogs on the network work fine. However, if I register a new user and site, that user gets the "You do not have sufficient ...
cpilko's user avatar
  • 715

1
2 3 4 5
25