Title: Schema add empty review array to the code
Last modified: October 26, 2021

---

# Schema add empty review array to the code

 *  Resolved [dror9098](https://wordpress.org/support/users/dror9098/)
 * (@dror9098)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/schema-add-empty-review-array-to-the-code/)
 * Hi there,
    There is a new critical issue on the schema that your plugin create.
   There’s a bug that your schema add at the end of the array of reviews an “empty”
   array of review for the products. Google detects this is an error which lead 
   to fail of product and review section. This need to be resolved ASAP please. `{“
   @type”:”Person”,”name”:””},”description”:””,”reviewRating”:{“@type”:”Rating”,”
   bestRating”:”5″,”ratingValue”:”5″,”worstRating”:”1″}}],”image”:[{“@type”:”ImageObject”,”
   @id”:”LINK\/#primaryimage”,”url”:”LINK”,”width”:”1000″,”height”:”1065″},{“@type”:”
   ImageObject”,”url”:”LINK”,”width”:120,”height”:121},
 * Google Error:Missing field ‘name’
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fschema-add-empty-review-array-to-the-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [dror9098](https://wordpress.org/support/users/dror9098/)
 * (@dror9098)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/schema-add-empty-review-array-to-the-code/#post-15006996)
 * Also,
    I’m thinking this happened cuz of this code from your plugin:
 *     ```
       if(isset($sd_data['saswp_default_review']) && $sd_data['saswp_default_review'] == 1){
   
                            $reviews_arr[] = array(
                            'author'        => saswp_get_the_author_name(),
                            'datePublished' => get_the_date("c"),
                            'description'   => saswp_get_the_excerpt(),
                            'reviewRating'  => 5,
                        );
   
                           $product_details['product_review_count']   = 1;
                           $product_details['product_average_rating'] = 5;  
   
                        }
       ```
   
 * This add a default 1 review with none content
 *  Plugin Support [Sanjeev Kumar](https://wordpress.org/support/users/sanjeevsetu/)
 * (@sanjeevsetu)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/schema-add-empty-review-array-to-the-code/#post-15020633)
 * We have created a ticket for this and will improve it in next update.
 * Ref: [https://github.com/ahmedkaludi/schema-and-structured-data-for-wp/issues/1557](https://github.com/ahmedkaludi/schema-and-structured-data-for-wp/issues/1557)
 *  Plugin Support [Sanjeev Kumar](https://wordpress.org/support/users/sanjeevsetu/)
 * (@sanjeevsetu)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/schema-add-empty-review-array-to-the-code/#post-15038510)
 * The issue has been fixed in latest version. Please update to it and let us know.?
 *  [adcabellos](https://wordpress.org/support/users/adcabellos/)
 * (@adcabellos)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/schema-add-empty-review-array-to-the-code/#post-15058118)
 * Hi,
 * I was having the same problem, then updated the plugin and keep seeing the empty
   array and Search Console doesn’t allow me to validate correction. The generated
   code in my page: [https://navas-sa.com/](https://navas-sa.com/) looks like this:
 * `{"@type":"AggregateRating","ratingValue":"5","reviewCount":11},"review":[{"@type":"
   Review","author":{"@type":"Person","name":""},"description":"","reviewRating":{"
   @type":"Rating","bestRating":"5","ratingValue":"5","worstRating":"1"}},{"@type":"
   Review","author":{"@type":"Person","name":""},"description":"","reviewRating":{"
   @type":"Rating","bestRating":"5","ratingValue":"5","worstRating":"1"}},{"@type":"
   Review","author":{"@type":"Person","name":""},"description":"","reviewRating":{"
   @type":"Rating","bestRating":"5","ratingValue":"5","worstRating":"1"}},{"@type":"
   Review","author":{"@type":"Person","name":""},"description":"","reviewRating":{"
   @type":"Rating","bestRating":"5","ratingValue":"5","worstRating":"1"}},{"@type":"
   Review","author":{"@type":"Person","name":""},"description":"","reviewRating":{"
   @type":"Rating","bestRating":"5","ratingValue":"5","worstRating":"1"}},{"@type":"
   Review","author":{"@type":"Person","name":""},"description":"","reviewRating":{"
   @type":"Rating","bestRating":"5","ratingValue":"5","worstRating":"1"}},{"@type":"
   Review","author":`
 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/schema-add-empty-review-array-to-the-code/#post-15069343)
 * adcabellos: As per forum guidelines, Please create a new topic.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Schema add empty review array to the code’ is closed to new replies.

 * ![](https://ps.w.org/schema-and-structured-data-for-wp/assets/icon-256x256.png?
   rev=1922284)
 * [Schema & Structured Data for WP & AMP](https://wordpress.org/plugins/schema-and-structured-data-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/schema-and-structured-data-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/schema-and-structured-data-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/schema-and-structured-data-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/schema-and-structured-data-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/schema-and-structured-data-for-wp/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [Magazine3](https://wordpress.org/support/users/magazine3/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/schema-add-empty-review-array-to-the-code/#post-15069343)
 * Status: resolved