Hello,
It is actually a small bug in Joomla ! It's been quite some time I have ben bugged by this, so i wanted to correct this with my sh404SEF component. Then I saw it was already there, simply it was not working. To fix it :
- Open /components/com_content/content.html.php
- locate function show(???), near line 435 (J! 1.0.13)
- locate this piece of code at line 445
Code: Select all
// adds mospagebreak heading or title to <site> Title
if ( isset($row->page_title) && $row->page_title ) {
$mainframe->setPageTitle( $row->title .' '. $row->page_title );
}
- move or copy it down a few lines, immediatly after :
Code: Select all
// process the new bots
$_MAMBOTS->loadBotGroup( 'content' );
$results = $_MAMBOTS->trigger( 'onPrepareContent', array( &$row, &$params, $page ), true );
So the beginning of function show now looks like :
Code: Select all
function show( &$row, &$params, &$access, $page=0 ) {
global $mainframe, $hide_js;
global $mosConfig_live_site;
global $_MAMBOTS;
$mainframe->appendMetaTag( 'description', $row->metadesc );
$mainframe->appendMetaTag( 'keywords', $row->metakey );
// calculate Itemid
HTML_content::_Itemid( $row );
// determines the link and `link text` of the readmore button & linked title
HTML_content::_linkInfo( $row, $params );
// link used by print button
$print_link = $mosConfig_live_site. '/index2.php?option=com_content&task=view&id=' . $row->id .'&pop=1&page='. $page . $row->Itemid_link;
// process the new bots
$_MAMBOTS->loadBotGroup( 'content' );
$results = $_MAMBOTS->trigger( 'onPrepareContent', array( &$row, &$params, $page ), true );
// adds mospagebreak heading or title to <site> Title
if ( isset($row->page_title) && $row->page_title ) {
$mainframe->setPageTitle( $row->title .' '. $row->page_title );
}
if ( $params->get( 'item_title' ) || $params->get( 'pdf' ) || $params->get( 'print' ) || $params->get( 'email' ) ) {
?>
<table class="contentpaneopen<?php echo $params->get( 'pageclass_sfx' ); ?>">
<tr>
Basically, addition of page_title was done before firing mambots, while it is the mambots that were calculating the page_title.
I have done very limited testing, I hope it does not break anything else.
I think I am still trying to make a workaround in sh404SEF.
Regards
PS: could you set up a bug in bug tracker if this is confirmed ?