Articles of wp error

Email Exists ERROR into Ajax registration form

My problem is that I can’t verify if some user insert an existing email into AJAX registration form. However my form is working fine, it’s registering users and it’s giving all other errors, like “invalid email” or “empty fields”. The only thing it doesn’t disaply is the error for the existing emails. function ajax_register(){ // […]

plugin generated unexpected output during activation, but it is empty

I am getting this error what is already answered in several threads here with same problem. Here the error message: The plugin generated 3 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin. Plugin that causes this error […]

Object of class WP_Error could not be converted to string

After deleting some categories (shouldn’t have done this), I get the following error Catchable fatal error: Object of class WP_Error could not be converted to string in [FILENAME] on line 45 Here’s the file which caused the error. Here’s an excerpt (line 45 is $output .= ‘<a href=”‘ . $link . ‘”>’ . $term->name. ‘</a>, […]

Why is_wp_error() is not returning false even there's no defined error

On the form submission I’m taking user comment for a custom purpose for my plugin. I’m checking whether the comment field is empty or not, and the comment field is filled with at least 30 characters. If both are ok, I want to insert the comment. Here’s my code: <?php global $current_user, $post; if( isset( […]

Catchable fatal error on 3.6 update

Trying to debug the situation. Getting close, but will need a little help!! Here is the error: Catchable fatal error: Object of class WP_Error could not be converted to string in /home/website/public_html/wp-content/themes/Alexia/lib/functions/common.php on line 97 And my code from the error: // no cache files – let’s finally resize it $new_img_path = image_resize( $file_path, $width, […]

Get errors from WP_Error to different variables

I have added multiple errors in the WP_ERROR. I want to get those errors separately in different variables. With the following code I can get all errors with foreach loop, but how can I assign them to separate variables. The errors I have added are ‘login_error‘ and ‘email_error‘. <?php $return = my_custom_function(); if ( is_wp_error($return) […]

Template administration Error after WP 4.8 update

We are using UpStream template on our WP site. After the last WP 4.8 update, we are getting an error message on the administration panel, which does not allow us to use the slideshow. The error is the following: Fatal error: Uncaught Error: Function name must be a string in /var/www/vhost/ Stack trace: #0 /var/www/vhost/ […]

Checking return with WP Error

I’ve seen other people with similar problems, and I know that I need to check the return when calling for the child items in my custom taxonomy “hhie_artists”. I’m not sure how to echo my output to incorporate wp_error. Here is my code: <?php $taxonomyName = “hhie_artists”; //Call top layer terms only (by setting Parent […]

Handling nonce generation in AJAX registration process

I am currently working on a multi-steps registration system, based on the new WordPress Rest API and I got an issue related to the nonce generation and verifying. My first step is to ask the user from a frontend form for the essential information (name – firstname – email address). The second one is to […]

How to group multiple wp_errors together?

I have created a custom registration form on wordpress. There is validation errors for each field and wordpresss just dumps all errors above the form. I tried to separate these errors into multiple output each will appear below its input field in the form by calling get_error_message(‘error_code’); but, there is multiple errors for each field. […]