• Resolved danieledti

    (@danieledti)


    Notice: Uninitialized string offset: 0 in /home/escolaedti/public_html/wp-content/plugins/wordpress-seo/frontend/class-twitter.php on line 495

    A tag “head > style[amp-boilerplate]” está ausente ou incorreta, mas é exigida pela “noscript > style[amp-boilerplate]”.

    translation:

    A “head> style [amp-boilerplate]” tag is missing or incorrect, but is required by “noscript> style [amp-boilerplate]”.

    to fiz this I only delete the code line:

    <br />
    <b>Notice</b>: Uninitialized string offset: 0 in <b>/home/escolaedti/public_html/wp-content/plugins/wordpress-seo/frontend/class-twitter.php</b> on line <b>495</b><br />

    line 10 of my code.

    but I delete this code in the cache, so, when I enter on the url the code is automatic created.

    How can I fix this? where is this message created ?

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support devnihil

    (@devnihil)

    @danieledti This error may be caused by a plugin or theme conflict. Can you try and gather as much information for us as possible? Please perform the following:

    1. Make sure the issue doesn’t persist when Yoast SEO is disabled.
    2. Check for conflicts.
    3. Check for JavaScript errors with your console.
    If you find any JavaScript errors related to Yoast SEO or if there is a conflict with a plugin or a theme, you can create a new GitHub issue for our developers. Please report the issue to a third party developer as well.

    If you didn’t find any conflicts or errors, we think the issue is specific to your site. We’d need to investigate further but are unable to do so on these forums. You can purchase Yoast SEO Premium and receive our Premium email support and we can help you further.

    Thread Starter danieledti

    (@danieledti)

    if you access this page “https://www.escolaedti.com.br/indicadores-inadimplencia/&#8221; you will see the error, this appears then I was changing http to https, anda update the plugin, I don’t have JavaScript errors.

    Why the plugin write something I my code?

    and how can I delete this parte of code, because if I delete my AMP stayed right.

    Thread Starter danieledti

    (@danieledti)

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    Did you perform the conflict check? Can you please let us know the results of the conflict check?

    Thread Starter danieledti

    (@danieledti)

    Did you perform the conflict check?
    yes
    Can you please let us know the results of the conflict check?
    twitter cards image

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    If you didn’t find any conflicts or errors, we think the issue is specific to your site. We’d need to investigate further but are unable to do so on these forums. You can purchase Yoast SEO Premium and receive our Premium email support and we can help you further.

    Thread Starter danieledti

    (@danieledti)

    the only thing that I need it is the text change the place or doesn’t appear, if the text appears after </head> its’s ok.
    So how can I do that?

    when this text appears break all my AMP code.

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    Unfortunately, we are unable to confirm exactly why you are seeing the error as we are unable to reproduce the issue on our end. Therefore, it’s not possible exactly to provide you a solution at this moment without investigating this issue further on your site.

    Thread Starter danieledti

    (@danieledti)

    Hi @mazedulislamkhan,

    to fix the problem I made a change on the code!

    /**
    	 * Outputs a Twitter image tag for a given image
    	 *
    	 * @param string $img The source URL to the image.
    	 * @param string $tag The tag to output, defaults to image:src but can be altered for use in galleries.
    	 *
    	 * @return bool
    	 */
    	//protected function image_output( $img, $tag = 'image:src' ) {
    	protected function image_output( $img, $tag = 'image' ) {
    		/**
    		 * Filter: 'wpseo_twitter_image' - Allow changing the Twitter Card image
    		 *
    		 * @api string $img Image URL string
    		 */
    		$img = apply_filters( 'wpseo_twitter_image', $img );
    
    		$escaped_img = esc_url( $img );
    
    		if ( in_array( $escaped_img, $this->shown_images ) ) {
    			return false;
    		}
    
    		if ( is_string( $escaped_img ) && $escaped_img !== '' ) {
    			$this->output_metatag( $tag, $escaped_img, true );
    			array_push( $this->shown_images, $escaped_img );
    
    			return true;
    		}
    
    		return false;
    	}

    now it is fixed!

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    We’d welcome you to submit a pull request in our development repository so our development team can look into this further.

    Thread Starter danieledti

    (@danieledti)

    https://github.com/Yoast/wordpress-seo/issues/9941

    if you wanna follow the request.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘head> style [amp-boilerplate]’ is closed to new replies.