clickstorm / cs_seo

[clickstorm] SEO
Other
33 stars 49 forks source link

Title tag doesn't work #269

Closed melaniemedialight closed 4 years ago

melaniemedialight commented 4 years ago

In version 5.0.0, the userfunc for the title tag has been removed but the typoscript didn't change :

### Generate the meta tags ###
config {
    pageTitleFirst = 1
    pageTitleSeparator = |
    pageTitleSeparator.noTrimWrap = | | |

    # @todo use TitleTagProvider when https://forge.typo3.org/issues/86573 is solved
    titleTagFunction = Clickstorm\CsSeo\UserFunc\PageTitle->render
}

I triied to use the TitleTagProvider like this, but it doesn't work :

config {
    pageTitleProviders {
        record {
          provider = Clickstorm\CsSeo\PageTitle\CsSeoPageTitleProvider
        }
    }
}
Scopestyle commented 4 years ago

Hi @melaniemedialight I'm dealing with the same issue. I ended up using this workaround in my config, skipping the cs_seo title tag functionality:

page.headerData.10 = TEXT
page.headerData.10.field = seo_title // subtitle // title
page.headerData.10.wrap = <title>| ### SiteName Here ###</title>

[page["uid"] in [1]]
    page.headerData.10.wrap = <title>|</title>
[global]

The last part refers to the homepage, which in my case had a different title setup then the other subpages, where the site name gets added automatically after each page. Hope this helps!

melaniemedialight commented 4 years ago

Hi @Scopestyle

I did the same thing but it does not solve the basic problem

mhirdes commented 4 years ago

The titletagfunction is deprecated and not supported by the core anymore. This is also the reason why we skip the functionality to show the page title only without the sitename, because this is also not provided by the core https://forge.typo3.org/issues/86573

In the ext_localconf.php https://github.com/clickstorm/cs_seo/blob/c5389ddcfa59214dfd17231c9dc29ffca2d7ad2a/ext_localconf.php we register the CsSeoPageTitleProvider add the end of the file. This should work. Maybe you can check your TypoScript Object Browser.