The tag has no wiki summary.

learn more… | top users | synonyms (1)

20
votes
6answers
11k 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 ...
12
votes
7answers
21k 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 ...
8
votes
1answer
7k 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 ...
7
votes
5answers
12k 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 ...
7
votes
3answers
6k 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? ...
7
votes
6answers
1k 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 ...
7
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 ...
6
votes
2answers
595 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 ...
6
votes
2answers
6k 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 ...
6
votes
1answer
899 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
3answers
2k 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 ...
5
votes
3answers
728 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
1answer
972 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
2answers
1k 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
5answers
6k 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
2k 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
4answers
843 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 ...
4
votes
2answers
3k views

wp_enqueue_script was called incorrectly

Hello 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, ...
4
votes
1answer
877 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 ...
4
votes
1answer
875 views

Uncaught ReferenceError:switchEditors is not defined

Is anyone familiar with this error? It is causing TinyMCE to break in my Wordpress theme. In console it gives me these two errors both seem to originate from wp-admin/post-new.php Uncaught ...
4
votes
3answers
2k 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
1answer
512 views

Walker_Nav_Menu exeption

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 ...
3
votes
1answer
516 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
3answers
2k views

Undefined property: stdClass::$labels in general-template.php post_type_archive_title()

I've got a custom post type with a standard tag taxonomy added to it like so: 'taxonomies' => array('post_tag'). I've added some tags to some posts of this CPT which are display on the front-end ...
3
votes
1answer
456 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
452 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
343 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 ...
3
votes
2answers
834 views

When does remove_filter not work?

There are reports that remove_filter does not work under some circumstances, and that we should provide alternatives. However, the article does not really make it clear under which circumstances this ...
3
votes
1answer
50 views

foreach error on false boolean from get_terms

I'm grabbing an array of page ids that were created in another function which I use regularly- that's all good. The issue I have is in the below function. Some pages have not been assigned an ...
3
votes
1answer
68 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
1k 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
271 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 ...
3
votes
1answer
141 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 ...
3
votes
1answer
798 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 ...
3
votes
1answer
2k views

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

I'm running WordPress on localhost WAMP server and whenever I go to "Plugins" or "Dashboard > Updates" or even to "Dashboard" nothing loads (no WordPress news, no updates, I'm not able to search for ...
2
votes
1answer
368 views

Recommend a guide to catching plugin errors, please?

I'm working on a small plugin and on some WP installations it throws up the white screen of death. I'm new to this, and would like to know if there is a decent guide out to there (so far my googling ...
2
votes
3answers
1k views

An Unexpected HTTP Error occurred during the API request

I just did a clean install of Wordpress. But I have a problem when I install or use the WordPress API. So send me a sign An Unexpected HTTP Error occurred during the API request. The strange ...
2
votes
2answers
3k views

PHP Fatal error: Call to undefined function download_url()

First, Here is the full error: PHP Fatal error: Call to undefined function download_url() in /path/to/wordpress/wp-admin/includes/media.php on line 562 I have also posted the related functions at ...
2
votes
3answers
906 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
2answers
788 views

Debug mode shows Strict Standards

When I set WP_DEBUG to true in wp-config.php, I get to see all the strict standards and deprecated messages. I've set the error_reporting in my php.ini, ini_set() and error_reporting() to E_ERROR | ...
2
votes
3answers
2k views

Strict Standards Error bootstrap navwalker

I am having trouble understanding this error and I've not come across it before, please could someone help? Strict Standards: Declaration of wp_bootstrap_navwalker::start_lvl() should be compatible ...
2
votes
1answer
1k 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
143 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
2k 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 ...
2
votes
3answers
5k 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
138 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
69 views

Dashboard Disappears after Upgrade

Following a recent upgrade to WP and MySQL one site that has a custom built plugin throws a Fatal error: Fatal error: Cannot re-assign auto-global variable _REQUEST in ...
2
votes
2answers
1k 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
2k 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 ...