The errors tag has no wiki summary.
15
votes
6answers
5k 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 ...
6
votes
5answers
3k 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 ...
6
votes
3answers
328 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 ...
6
votes
1answer
563 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 ...
6
votes
2answers
2k 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 ...
5
votes
6answers
7k 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 ...
5
votes
3answers
331 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 - ...
5
votes
2answers
220 views
Is there a plugin that will override the “Error establishing a database connection” message?
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 ...
5
votes
1answer
200 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 keeps using non existing vars :
echo $args['title'];
Notice: Undefined index: title in ...
5
votes
1answer
3k 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 ...
4
votes
5answers
3k 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/ page that ...
4
votes
3answers
638 views
Why on Earth am I getting “undefined_index” errors?
Right, I'm banging my head against a wall here. I'm sure it's something incredibly simple but I keep getting undefined index errors on all of these variables.
function meta_genus_species() {
...
4
votes
3answers
2k 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? ...
4
votes
3answers
837 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 ...
4
votes
2answers
821 views
How to use WP_Error $data argument?
The Call
$error = new WP_Error( $code, $message, $data );
The Output
Say I added three messages (msg A, msg B, msg C) to the code my_code and with the last message I added "Data" as $data, which ...
4
votes
3answers
444 views
How to fix admin stylesheet muck-up? [closed]
I have no idea what's going on here.. running the latest version, just logged in and I find my admin area looking like this:
To me it looks like it's missing some/many styles and in load-styles.php ...
3
votes
4answers
503 views
What is the best way to monitor PHP functions/executions?
I am trying to find the best way to monitor which PHP code/functions, MySQL requests and/or plugins are slowing down pages on a site.
I know there are a bunch of different options out there including ...
3
votes
2answers
146 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 ...
3
votes
1answer
363 views
$wpdb->prepare() warning in WordPress 3.5
I am receiving this warning when I try to run a database query:
Warning: Missing argument 2 for wpdb::prepare()
The offending query is:
$result = $wpdb->get_var(
$wpdb->prepare(
...
3
votes
1answer
304 views
Why will using __construct instead of widget_class_name when creating widget trigger out of memory error
I find that if I use
class widget_name extends WP_Widget {
function __construct() { ... }
}
instead of
class widget_name extends WP_Widget {
function widget_name() { ... }
}
I get an ...
3
votes
1answer
501 views
Prevent notice and warnings in error_reporting?
When turning opn WP_DEBUG and WP_DEBUG_DISPLAY, I get tons of warnings and notices. I have tried to remove the warnings by doing a @ini_set('error_reporting', 1) to only show E_ERROR, but I still get ...
3
votes
1answer
60 views
why don't I get error messages in admin when developing?
I am curious as to why my screen goes completely blank when an error is present in my code. This only happens to me when it is an admin function.
No warnings, no syntax error messages, nothing. Just ...
3
votes
1answer
608 views
Plugins error (Use roles and capabilities instead) on latest version, multisite
I have the latest, version 3.1.2 and have multisite installed. I have debug on true for testing purposes. I get the follow error when I install plugins.
Where and how do I fix this?
Error:
...
3
votes
2answers
158 views
Is it possible to disable caching of an option when using w3 total cache?
a plugin i'm working on has a conflict with w3 total cache. To be more specific, in my code i have
static function get_instance()
{
if( self::$_instance === NULL ) {
// get the settings ...
2
votes
3answers
687 views
Getting Warnings & Notices from Fresh WordPress 3.1.2 install
I just installed WordPress 3.1.2, I got
`Notice: automatic_feed_links is deprecated since version 3.0! Use add_theme_support( 'automatic-feed-links' ) instead. in ...
2
votes
1answer
452 views
Fatal error: Call to undefined function wpsc_cart_item_count()
-- I've just done a fresh install of Wordpress 3.4
-- I've downloaded and uploaded this new free eCommerce wordpress theme suggested by smashing magazine.
{ ...
2
votes
2answers
133 views
How to handle core code throwing notice on valid input?
I have combination of valid input with native WP function throwing PHP notice. In this specific case it is image without extension with image_resize().
This is usually suppressed by WP, but it still ...
2
votes
1answer
87 views
Sql syntax error
Sometimes in my error log i have this error:
You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right syntax to
use near '' at line 1
...
2
votes
4answers
1k views
How to fix strange 500 Error after Editing Menu?
I have strange situation which just started which I seem to be unable to resolved. I am not sure what this might be related to but I think I remember reading somewhere that this has happened to ...
2
votes
2answers
40 views
Call to undefined function get_header() in index.php
I am trying to create a theme.
I created a header.php file and call this file in index.php using
<?php get_header();?>
When I try to run my index.php file it shows this error:
Call to ...
2
votes
1answer
517 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 ...
2
votes
1answer
229 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 ...
2
votes
1answer
84 views
PHP Notices appear when browsing any page in admin, but only for child theme, using code from WP Codex
My php_error.log in my console (locally on OSX) is reporting 3 PHP Notices. The PHP Notices only appear when browsing each admin page in the back-end for a site (running multisite) that uses a child ...
2
votes
1answer
585 views
wordpress plugin error handling
I am looking for a way to handle errors for a custom post type with its own custom fields. This is all part of a plugin I'm writing, however, after extensive research the only way I found is through ...
2
votes
3answers
307 views
WP Database Error (Windows Server 2008 & SQL Server)
I have a WP site up and running for my wife and she attempted to install a text widget that linked to her Twitter account (she says HTML was taken from Twitter.com). I am not sure exactly what she ...
2
votes
3answers
769 views
wp-admin seems to be redirecting
I'm having a strange problem with my w-admin login. This has only started since I upgraded to 3.0
When I go to wp-admin, the login form appears as normal, but when I enter my username and pass, I am ...
2
votes
2answers
182 views
Gallery Only Displaying One Thumbnail
My image galleries are showing only one thumbnail in the post the gallery sits in. http://themeforward.com/demo2/2013/03/08/image-gallery/
My single.php markup can be found here: ...
2
votes
1answer
214 views
WP_Error handles errors, but how can I show success with a message?
My script accesses an api to populate posts. I can add any errors to the WP_Error class, but can I add success messages to a global variable?
2
votes
1answer
147 views
Displaying oEmbed errors?
Sometimes embedding an item via oEmbed is not possible, for example when a YouTube video has embedding disabled. The oEmbed service will return a 401 Unauthorized, and the code will not be converted.
...
2
votes
1answer
90 views
Seaweed Plugin not working
I have installed the Seaweed (Wordpress Plugin).
I have successfully installed it and I can able to edit the content. But the save function is not functioning popularly. when I clicked on the "save ...
2
votes
0answers
72 views
Continue javascript execution when errors occurs
I use the WP native function wp_enqueue_script() for all my JavaScripts loading both in WP front and back-end so it can handle duplicated calls to the same script and so on.
One of the issues is that ...
1
vote
3answers
112 views
Does WordPress have a built in reference to the PHP version its running under? [closed]
I have a plugin that has a single method that requires PHP5. How can I code around the fact that the server may have PHP4?
Code is below... (I'm thinking its the DOMDocument object that's freezing ...
1
vote
3answers
1k views
Page output in strange characters
Apparently a lot of people complain that they only see random letters and characters:
My biggest problem is that I can't reproduce the problem on ANY of my devices!
Not on my Windows XP laptop, not ...
1
vote
2answers
150 views
How can I find the cause of theme crashing Apache in Xampplite?
I'm testing a version of my theme in WordPress 3.0 and it crashes Apache each time I try to preview it.
Where can I look to trace the cause of the crash? WP_DEBUG is of no use in this case, since it ...
1
vote
2answers
275 views
Allowed Memory Size Error in WordPress
My WordPress is always down. I contacted my host and they said that the server is fine. My WordPress site has some basic plugins which are
all in one seo
seo search tagging
google xml
robots.txt
...
1
vote
2answers
335 views
Does wordpress have an error log?
I accidentally removed a bunch of plugin folders. I restored them all directly after, but since then my site is completely blank. Can't see anything, it's just white.
I'm not sure what to do, but ...
1
vote
1answer
2k 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 ...
1
vote
4answers
1k views
What is causing this error? “Warning: Invalid argument”
I need urgent help figuring this out please - I've been working on a WordPress theme locally without problems, and now that I've uploaded it to the live server I'm getting this error:
Warning: ...
1
vote
2answers
195 views
Can WordPress email the admin about PHP errors, while hiding them from the site?
Is it possible to have WordPress email the site administrator whenever a PHP error message is displayed? Ideally the message would also be filtered out of the HTML output, so as to avoid information ...
1
vote
2answers
119 views
Weird problems after recovery from security breach
The shared server that I used for hosting my WordPress website was hacked recently, and many of the index.php files, plugin files and uploads were deleted, with my MySQL databases untouched. But after ...