contao/issues — Issue #462: search engine: wrong page titles
Author: importer
Created: 2011-11-24 12:51:32+00:00
State: open
Labels: Defect, framework

The indexer stores wrong page title if pages are indexed which contain insert_article tags, since the called getArticle method changes the global page title and this title remains the same for the next pages to be indexed. So the search result shows a lot of wrong page titles.
A quick hack I used for this error is this one (in Controller.php) to keep the page title (but I don't know which other side effects this might have...):

```
// Insert article
case 'insert_article':
global $objPage ;
$oldTitle = $objPage->pageTitle; # ID
$arrCache[$strTag] = $this->replaceInsertTags(ltrim($this->getArticle($elementsr1, false, true)));
$objPage->pageTitle = $oldTitle; # ID
break
```

--- _Originally created by anonymous on January 28th, 2009, at 05:00pm (ID 462)_