• Resolved agvs

    (@agvs)


    When inserting a block that includes an SVG element, Yoast throws a console error:

    Yoast SEO and readability analysis: An error occurred during the building of the tree structure used for some assessments.

    TypeError: this.treeAdapter.getAttrList is not a function
    at a.value (wp-seo-analysis-worker-1150.min.js:21)
    at a.value (wp-seo-analysis-worker-1150.min.js:21)
    at a.value (wp-seo-analysis-worker-1150.min.js:21)
    at a._runParsingLoop (wp-seo-analysis-worker-1150.min.js:21)
    at a.value (wp-seo-analysis-worker-1150.min.js:21)
    at e.parseFragment (wp-seo-analysis-worker-1150.min.js:21)
    at Object.e.default [as html] (wp-seo-analysis-worker-1150.min.js:21)
    at a.value (wp-seo-analysis-worker-1150.min.js:21)
    at a.<anonymous> (wp-seo-analysis-worker-1150.min.js:17)
    at v (wp-seo-analysis-worker-1150.min.js:17)

    You can replicate this bug with a simple block that outputs an SVG:

    const { __ } = wp.i18n;
    const { registerBlockType } = wp.blocks;
    
    const SVGBlock  = () => ( 
          <svg 
            xmlns="https://www.w3.org/2000/svg" 
            viewBox="0 0 101.82 101.82"
          >
              <path d="M50.912-.003l50.91 50.912-50.91 50.91L0 50.91z"/>
          </svg>
       );
    
    registerBlockType( 'test/svg-bug', {
    
    	title: __( 'svg bug' ),
    
    	description: __( 'Yoast doesn\'t like this' ),
    
    	icon: 'excerpt-view',
    
    	category: 'common',
    
    	attributes: {},
    
    	edit: SVGBlock,
    
    	save: SVGBlock
    
    } );
    
Viewing 6 replies - 1 through 6 (of 6 total)
  • Sorry to hear about your issue. Can you please confirm if the same error shows up with Yoast SEO 11.6?

    Thread Starter agvs

    (@agvs)

    I just upgraded to the latest Yoast and the issue persists.

    Hi,

    This is an issue. Thank you for bringing this issue to our attention. We apologize for the trouble you are experiencing with our plugin. An issue report is currently open with our development team for this issue.

    Though, we were not able to determine in Yoast what this error is affecting. Can you elaborate more on how this error may be affecting how Yoast is operating on your site? Is the Yoast metabox not working as expected?

    Thread Starter agvs

    (@agvs)

    It affects the output of the readability analysis.

    Thank you. We have added this to the issue report.

    In the meantime, we suggest signing up for our newsletter as that is where we will announce product changes and updates. You can sign-up for it here https://yoast.com/newsletter/.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘SVG elements in gutenberg cause Yoast readability error’ is closed to new replies.