Thread:Project:Support desk/Fatal error CustomTitle extension

Hi

I need using CustomTitle extension, and I have read that it is outdated, patched as suggested in the talk of the extension's page to make it work with my mediawiki 1.19.

It works in most cases, but with the patch there is a fatal error when the title contains a simple quote.

Parse error: syntax error, unexpected T_STRING in /**********/mediawiki/extensions/CustomTitle/CustomTitle.php(107) : regexp code on line 1 Fatal error: preg_replace: Failed evaluating code: in /**********/mediawiki/extensions/CustomTitle/CustomTitle.php on line 107

Line 107 is the line with preg_replace :

function onSkinTemplateOutputPageBeforeExec(&$m_skinTemplate, &$m_tpl) {     if (isset($this->customTitle)) {         $m_tpl->set('title', $this->customTitle); $m_tpl->set('pagetitle', $this->customTitle); $text = $m_tpl->data['headelement']; $regex = "#(\)(.*)(\<\/title\>)#e"; $customtitle = $this->customTitle; $title = "' '.'$customtitle'.' '"; $text = preg_replace($regex,$title,$text); $m_tpl->set('headelement', $text); }     return true; }

Did someone solved this issue, or knows how ? Or is there a replacement for this very useful extension ?

Thanks.