Viewing 30 posts - 1 through 30 (of 42 total)
  • Author
    Posts
  • #913605

    Good morning,

    I’ve tested my site on google and I received errors in structured data. https://search.google.com/structured-data/testing-tool?hl=nl
    8 errors in Blogposting:
    Google herkent de property ImageObject niet voor een object van het type BlogPosting.
    6 errors in Webpage:
    Google herkent de property ImageObject niet voor een object van het type WebPage.
    Its about: <span class=’av-structured-data’ itemprop=”ImageObject” itemscope=”itemscope” itemtype=”https://schema.org/ImageObject&#8221; itemprop=’image’>

    How to solve this problem?

    Thank you, regards!

    #914007

    Hey Dutchman,

    If you want to change the structure data, from what we provide from Enfold, we would need you to modify the template files based on your needs.
    That said, you would need to go, take the theme files, move to to a child theme and then use them as you want.

    Best regards,
    Basilis

    #915105

    Hey Basilis,

    I added an image to a blog with the help of:
    [av_image src=’https://www. [/av_image]
    This results in errors the structured data test tool is giving me. So it’s nothing more then a blog with a couple of images.
    I would like a blog with an image without errors in the structured data testing tool.

    #915290

    Hi,

    Thank you for the update.

    Please add this code in the functions.php file.

    add_filter('avf_markup_helper_attributes', 'avf_markup_helper_attributes_modified', 10, 2);
    function avf_markup_helper_attributes_modified($attributes, $args) {
    	if($args['context'] == 'image') {
    	     unset($attributes['itemscope']);
                 unset($attributes['itemtype');
    	}
    	return $attributes;
    }

    It will unset the image object.

    Best regards,
    Ismael

    #916809

    Hi Ismael,

    Why does a default blog page with a simple image gives an error at the structured data testing tool? Is it wrong to use [av_image src=’https://www. [/av_image] in a blog?
    So everybody need to put this code into functions.php if they want to avoid these errors?

    Edit: I allready have to put this in functions.php:

    add_filter('avf_markup_helper_attributes', 'avf_markup_helper_attributes_modified', 10, 2);
    function avf_markup_helper_attributes_modified($attributes, $args) {
    	if($args['context'] == 'entry') 
            {
    		//* If main query,
    		if ( is_main_query() ) unset($attributes['itemprop']);
    	}
    
            if($args['context'] == 'content') 
            {
                    if (is_singular('post') || is_archive() || is_home())
                    {
                        $attributes['itemprop'] = 'mainEntity';
                    }
    	}
    
    	return $attributes;
    }
    • This reply was modified 6 years, 9 months ago by Dutchman.
    #917645

    Hi,

    Why does a default blog page with a simple image gives an error at the structured data testing tool?

    The ImageObject is not a valid property of the BlogPosting object, which is why the tool is returning the errors. Please replace and combine the previous filters with this.

    add_filter('avf_markup_helper_attributes', 'avf_markup_helper_attributes_modified', 10, 2);
    function avf_markup_helper_attributes_modified($attributes, $args) {
    	if($args['context'] == 'image') {
    	    $attributes['itemscope'] = 'itemscope';
    		$attributes['itemtype']  = 'https://schema.org/image';
    		$attributes['itemprop']  = 'image';
    	}
    
    	if($args['context'] == 'entry') 
            {
    		//* If main query,
    		if ( is_main_query() ) unset($attributes['itemprop']);
    	}
    
            if($args['context'] == 'content') 
            {
                    if (is_singular('post') || is_archive() || is_home())
                    {
                        $attributes['itemprop'] = 'mainEntity';
                    }
    	}
    
    	return $attributes;
    }

    It’s going to replace the “ImageObject” with the “image” property.

    Best regards,
    Ismael

    #917967

    Hi Ismael,

    After i replaced the code with your combination code i get more errors:
    Google herkent de property ImageObject niet voor een object van het type BlogPosting.
    cancel@type
    image (Google herkent het type image niet.) (Google does’t recognise image.

    I still do not understand why Google testing tool gives us these errors in a default blog page from Enfold. Errors for blogposting and ImageObject.
    Even your default demo has these errors: https://kriesi.at/themes/enfold-2017/blog/blog-single-author-big/

    + I added 1 other example with a different error. On the second page i “use av-masonry-image-container” and that results in ”
    Google herkent de property ImageObject niet voor een object van het type WebPage.”

    #918852

    Hi,

    Did you refresh the page before the structure test? I want to check it myself but I can’t access the structured data testing tool today. Odd.

    Best regards,
    Ismael

    #920736

    Hi, I refreshed and cleared the cache but that did not help.

    #922014

    Hi,

    The type is still set to “ImageObject” instead of “image”. I don’t think the filter was added correctly. Please provide the login details in the private field so that we can check it.

    Best regards,
    Ismael

    #922791

    Hi Ismael, i copied excactly what you told me to and replaced my code with your code but since it created more errors in the structured data testing tool, i put the old code back in functions.php.
    I replaced it with your code and like i said more errors:
    Google herkent de property ImageObject niet voor een object van het type BlogPosting.
    cancel@type
    image (Google herkent het type image niet.)

    #924210

    Hi,

    Thank you for the update. Did you copy the code from your email? Please copy it directly from this forum. Or provide the login details so that we can add the new filter.

    Best regards,
    Ismael

    #924344

    Hi,
    I did copied it from this forum. I provided the login details.

    #924384

    Hi,

    Thank you for the info. I’m getting an error in the Appearance > Editor panel. Please provide the FTP login details.

    Er is iets fout gegaan. Uw wijziging is mogelijk niet opgeslagen. Probeer opnieuw. Er is een kans dat u dit handmatig moet repareren en het bestand uploaden via FTP.

    The itemprop attribute is missing in the filter. We updated the code above.

    // https://kriesi.at/support/topic/error-in-structured-data-3/#post-917645

    Best regards,
    Ismael

    #924422

    The problem is still there. I replaced it with the ‘new’ code but there are still 14 errors.

    • This reply was modified 6 years, 8 months ago by Dutchman.
    #926448

    Hi,

    In the data structure testing tool field, I changed the itemprop and itemtype attributes to “image” and it worked. The errors are gone. The filter should do the same. Please provide the FTP details in the private field so that we can test it.

    Best regards,
    Ismael

    #926870

    Hi,
    Details are in the private section

    #927070

    Hi,

    I think you forgot the user name. Is that the FTP details?

    Best regards,
    Ismael

    #927133

    Hi Ismael,
    I reinstalled the theme through FTP but @ Appearance >> Editor Panel i still get the same error when i try to save the functions.php.
    These are the FTP login details.

    #927887

    Hi,

    I’m sorry but this is still not working on FileZilla. I’ll ask the rest of the support team to check the thread.

    Best regards,
    Ismael

    #927970

    Hi!

    The function has been added to your site via FTP. Please review the site and let us know if you have any questions.

    Please wait while we update you!

    In the meantime could you please provide us with your hosting control panel details, please?

    Thank you for using Enfold.

    Regards,
    Vinay

    • This reply was modified 6 years, 8 months ago by Vinay.
    #928250

    Hi Ismael,

    I found the plugin that blocked the functions.php from editing through Appearance, Editor panel. You can login and edit the functions.php please. The code you gave me is at the very bottom.

    • This reply was modified 6 years, 8 months ago by Dutchman.
    #928848

    Hi,

    The site is not loading properly on my end. Did you do anything to the site?

    Best regards,
    Ismael

    #928918

    Hi, can you try again please. The site works fine.

    #929737

    Hi,

    We replaced the filter with the following code.

    add_filter('avf_markup_helper_attributes', 'avf_markup_helper_attributes_modified', 10, 2);
    function avf_markup_helper_attributes_modified($attributes, $args) {
    	if($args['context'] == 'image') {
    	    unset($attributes['itemscope']);
    		unset($attributes['itemtype']);
    		unset($attributes['itemprop']);
    	}
    
    	if($args['context'] == 'entry') 
            {
    		//* If main query,
    		if ( is_main_query() ) unset($attributes['itemprop']);
    	}
    
            if($args['context'] == 'content') 
            {
                    if (is_singular('post') || is_archive() || is_home())
                    {
                        $attributes['itemprop'] = 'mainEntity';
                    }
    	}
    
    	return $attributes;
    }

    Best regards,
    Ismael

    #931098

    Now there are 2 new errors about the size of the image in the Structured data testing tool.
    “1200 (Google herkent de property height niet voor een object van het type BlogPosting.)”
    “2560 (Google herkent de property width niet voor een object van het type BlogPosting.)”

    I still do not understand why Google testing tool gives us these errors in a default blog page from Enfold.
    Even your default demo has these (12) errors! https://kriesi.at/themes/enfold-2017/blog/blog-single-author-big/
    Is this something you should change in the default installation files? Looks like a bug to me.

    #932780

    Hi,

    I’m sorry for the late response. Please modify the includes > loop-index.php file, look for the “av_blog_entry_markup_helper” function on line 290. Add the ‘image’ in the array.

    echo av_blog_entry_markup_helper($current_post['the_id'], array('image'));
    

    Which plugin causes the issue with the Appearance > Editor panel? Please disable it temporarily so that we can edit the file.

    Best regards,
    Ismael

    #935831

    Hi Ismael,
    Its the Universal Video Player. I disabled it. And i replaced line 290 with yours. The Google structured data testing tool show an error. The homepage shows warnings about the height and width. I was hoping for a clean working solution. Maybe Kriesi or another mod has a structured solution for this issue.

    • This reply was modified 6 years, 7 months ago by Dutchman.
    #936257

    Hi,

    I’ll ask the rest of the support team to check the thread. They will probably suggest the same things.

    Best regards,
    Ismael

    #940796

    Maybe Yigit has a solution for this issue to get rid of all the errors.
    I still do not understand why Google testing tool gives us these errors in a default blog page from Enfold.
    Even your default demo has these (12) errors! https://kriesi.at/themes/enfold-2017/blog/blog-single-author-big/
    Is this something you should change in the default installation files? Looks like a bug to me.

Viewing 30 posts - 1 through 30 (of 42 total)
  • You must be logged in to reply to this topic.