Title: Error in WP block editor
Last modified: February 14, 2021

---

# Error in WP block editor

 *  [pmdaniel](https://wordpress.org/support/users/pmdaniel/)
 * (@pmdaniel)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wp-block-editor/)
 * Hello,
    I have been using YASR for a few weeks and I am very happy, but there
   is an annoying error whenever I am editing the pages through the wp block editor:“
   This block counts unexpected or invalid content”. It is also impossible to open
   the “Yasr settings” menu, if I try to do this I have to disable the plugin to
   be able to edit any page again.
 * screenshots:
 * > [View post on imgur.com](https://imgur.com/a/dQTRlSH)
 * Can you help?
 * Thanks

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

 *  Plugin Contributor [dudo](https://wordpress.org/support/users/dudo/)
 * (@dudo)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wp-block-editor/#post-14050950)
 * Hi,
 * I will try to reproduce the error and let you know, thank you for sharing this.
 *  Plugin Contributor [dudo](https://wordpress.org/support/users/dudo/)
 * (@dudo)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wp-block-editor/#post-14053203)
 * I’m not able to reproduce the issue, can you please paste a screenshoot of your
   settings?
 *  Thread Starter [pmdaniel](https://wordpress.org/support/users/pmdaniel/)
 * (@pmdaniel)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wp-block-editor/#post-14053649)
 * Hi,
    First of all thanks for the help!
 * Here is a screenshot of when I click to open “YASR settings” in the page editor:
 * > [View post on imgur.com](https://imgur.com/a/WcepfxF)
 * The log is:
    TypeError: Cannot read property ‘yasr_overall_rating’ of undefined
   at ref …
    -  This reply was modified 5 years, 4 months ago by [pmdaniel](https://wordpress.org/support/users/pmdaniel/).
    -  This reply was modified 5 years, 4 months ago by [pmdaniel](https://wordpress.org/support/users/pmdaniel/).
 *  Thread Starter [pmdaniel](https://wordpress.org/support/users/pmdaniel/)
 * (@pmdaniel)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wp-block-editor/#post-14053736)
 * I guess this is related with the custom post type, because if i create a normal
   post, it doesn’t happen.
 *  Thread Starter [pmdaniel](https://wordpress.org/support/users/pmdaniel/)
 * (@pmdaniel)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wp-block-editor/#post-14053754)
 * My post here was held for moderation because of the logs in it…
 * Here is a screenshot of when I click to open “YASR settings” in the page editor:
 * > [View post on imgur.com](https://imgur.com/a/WcepfxF)
 * Thanks!
    -  This reply was modified 5 years, 4 months ago by [pmdaniel](https://wordpress.org/support/users/pmdaniel/).
 *  Plugin Contributor [dudo](https://wordpress.org/support/users/dudo/)
 * (@dudo)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wp-block-editor/#post-14070165)
 * I’m trying again and again but not able to reproduce it.
 * Which plugins do you have installed?
 *  Thread Starter [pmdaniel](https://wordpress.org/support/users/pmdaniel/)
 * (@pmdaniel)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wp-block-editor/#post-14076849)
 * I was wrong, it also happens with the posts, without cpt ui.
    Let’s go by steps
   I created a new post, added only the block “yasr: visitor votes” and saved the
   draft. When I reopen it gives me the following error: “This block countains unexpected
   or invalid content” The console shows:
 * > [View post on imgur.com](https://imgur.com/aH6pnt2)
 * I noticed that the shortcode brings the postid with the post id of the post I
   created.
    If I do “Attempt block recovery”, the block recovers and the postid
   disappears.
 * Also,
 * In a post (not a custom post) if I open the YASR Settings it always works without
   problems.
 * But, in a custom post (cpt ui) it also gives me the error:
    “The editor has encountered
   an unexpected error.” And the console shows the following: TypeError: Cannot 
   read property ‘yasr_overall_rating’ of undefined
 * in that case I can never open the editor again. I have to disable the plugin 
   or go to a normal post and change to the general settings
 * Thanks a lot for the help!
    -  This reply was modified 5 years, 4 months ago by [pmdaniel](https://wordpress.org/support/users/pmdaniel/).
    -  This reply was modified 5 years, 4 months ago by [pmdaniel](https://wordpress.org/support/users/pmdaniel/).

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

The topic ‘Error in WP block editor’ is closed to new replies.

 * ![](https://ps.w.org/yet-another-stars-rating/assets/icon-256x256.png?rev=1525329)
 * [YASR - Yet Another Star Rating Plugin for WordPress](https://wordpress.org/plugins/yet-another-stars-rating/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yet-another-stars-rating/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yet-another-stars-rating/)
 * [Active Topics](https://wordpress.org/support/plugin/yet-another-stars-rating/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yet-another-stars-rating/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yet-another-stars-rating/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [pmdaniel](https://wordpress.org/support/users/pmdaniel/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wp-block-editor/#post-14076849)
 * Status: not resolved