Project

General

Profile

Actions

Bug #87625

open

MetaTagApi gives an Error in the Frontend when "og:image" is a stdWrap Value in TypoScript

Added by Julian Mair over 5 years ago. Updated over 2 years ago.

Status:
New
Priority:
Must have
Category:
SEO
Target version:
-
Start date:
2019-02-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have a problem with the MetaTag Api.
When I have in my TypoScript `og:image` lines, then i got this error in the frontend:

#1524209729 UnexpectedValueException: This MetaTagManager can't handle property "og:image:type" 

During my research i found out that the problem lies inside the `stdWrap` part of the `og:image` config (see below; the cObject Node).
When i remove the whole `cObject` Node and add something static like `og:image = /image.jpeg`, then it will work perfectly.

og:image {
    attribute = property
    cObject = FILES
    cObject {
        maxItems = 1
        references {
            table = pages
            uid.data = page:uid
            fieldName = media
        }
        # image from media field
        renderObj = TEXT
        renderObj {
            data = file:current:publicUrl
        }
        # fallback image if no media field was set
        stdWrap.ifEmpty.fallback = TEXT
        stdWrap.ifEmpty.fallback.value = /fallback.jpeg
    }
}
og:image:type = image/jpeg
og:image:type.attribute = property
og:image:width = 1280
og:image:width.attribute = property
og:image:height = 720
og:image:height.attribute = property

Side Note: this snippet worked perfectly in v8.7.*


Files

diff.png (114 KB) diff.png Julian Mair, 2019-02-03 15:14
meta_og_image_error.JPG (125 KB) meta_og_image_error.JPG David Menzel, 2020-02-20 15:11
Actions

Also available in: Atom PDF