0

It is not a bug, of course, but i cant figure out how to solve it. With previous version of News there was all fine. Sorry for my language, it hard to explain. Current Behavior For example - I have this page title behaivor for the first time news detail page visit -

"SiteName: Some NewsRecord Title" (this is fine, how it should be).

Then when i go to list view, and again click on news to view it in detail (or just refresh the page I'm currently viewing) - page title gets look like this:

"SiteName: news" where "news" is a page title in the backend page tree, that contains newsDetailView plugin

To override this strange behavior, i use such typoscript setup (But this should not be a permanent solution to the problem, of course)

[globalVar = TSFE:id = 7]

config.noPageTitle = 2
temp.newsTitle = RECORDS
temp.newsTitle {
  dontCheckPid = 1
        tables = tx_news_domain_model_news
        source.data = GP:tx_news_pi1|news
        source.intval = 1
        conf.tx_news_domain_model_news = TEXT
        conf.tx_news_domain_model_news {
            field = title
            htmlSpecialChars = 1
        }
        wrap = <title>SiteName:&nbsp;|</title>
}
page.headerData.1 >
page.headerData.1 < temp.newsTitle

[global]

Environment

TYPO3 version(s): [9.5.15]
news version: [8.0.0]
Composer (Composer Mode): [no]
Mercer
  • 23
  • 3

1 Answers1

0

With 9.5 and the nice SEO extension you really shouldn't do such stuff anymore. Don't use config.noPageTitle and it should work out of the box as the news extension will set the title just right.

Georg Ringer
  • 7,779
  • 1
  • 16
  • 34
  • Hi, Georg. May be i was not so clear, but i have SEO ext. installed and activated. But i can not get to right title generation in detail view without using the above typoscript. As i was mention, detail view page title only shown correctly for the first time Detailpage visit. If i refresh that page than, the title gets like i said above - Site name: backendPageDetailViewTitle. Clear all caches solves this temporaryly, just until i go to view detail news page and refresh it, or visit for the second time. It is missconfiguration somewhere on my side, i just dont know the way to find it out. – Mercer Apr 29 '20 at 09:55
  • such stuff helps too, but again, it is wrong way `[7 in tree.rootLineIds] config.no_cache = 1 [global]` – Mercer Apr 30 '20 at 11:36
  • with `config.noPageTitle = 2` you disable the rendering of the title. By using https://github.com/georgringer/news/blob/master/Resources/Private/Templates/News/Detail.html#L21-L32 it should all work out fine. – Georg Ringer May 01 '20 at 08:38
  • The problem is here without using the above TS setup at all (including noPageTitle). Detail Template is fine. It's somehow cache related or something. I can not really figure it out. The title is get correct only once, after the cache cleaning. On second time detailpage viewed, the news title gets lost. Thanks for attention. – Mercer May 01 '20 at 09:03