symfony-cmf / seo-bundle

A SEO Solution for duplicate contents, page titles, etc.
https://cmf.symfony.com
47 stars 27 forks source link

Title, Description itp not show Symfony 2.8 #327

Open boxbillinggit opened 7 years ago

boxbillinggit commented 7 years ago

Hello, nowhere can I find help so I write here, I'm currently loaded cmf seo-bundle 2.x and the problem is that the only downloads the title, and the rest do not, how can I do that flashed me all the fields that I have completed the following data which come from the database

Object:

Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadata Object
(
    [id:Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadata:private] => 
    [locale:Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadata:private] => 
    [originalUrl:Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadata:private] => /pl/kontakt
    [metaDescription:Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadata:private] => Jakis MetaDescription
    [metaKeywords:Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadata:private] => KEYWORDS
    [title:Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadata:private] => Kontakt
    [extraProperties:Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadata:private] => Array
        (
        )

    [extraNames:Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadata:private] => Array
        (
        )

    [extraHttp:Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadata:private] => Array
        (
        )

)

Header:

<title>Kontakt - Prospona</title>

            <meta name="keywords" content="foo bar" />
<meta name="description" content="The description" />
<meta name="robots" content="index, follow" />
<meta property="og:site_name" content="Sonata Project Sandbox" />
<meta property="og:description" content="A demo of the some rich bundles for your Symfony2 projects" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-Ua-Compatible" content="IE=EmulateIE7" />
<meta charset="UTF-8" />
ElectricMaxxx commented 7 years ago

So, do i understand it right: You have got a string i.e. in description and title of you persisted SeoMetadata and the description isn't displayed in the meta tag?

boxbillinggit commented 7 years ago

Yes displays only the title, and the rest meta is no longer in the object SeoMetadata the show and the display is already only the title correct.

dbu commented 7 years ago

i just tested this in the cmf sandbox with the latest version of the seo bundle and it works there. do you output all information in your template?

        {{ sonata_seo_metadatas() }}
        {{ sonata_seo_link_canonical() }}
        {{ sonata_seo_lang_alternates() }}
        {{ sonata_seo_title() }}

if you followed the documentation, is it maybe lacking, could we improve something there?