cms: latest Joomla 2.5
I am created template and then install it on Joomla(extensions->extension manager).
It says 'Installing template was successful.'.
I am going to Extensions->Template manager->Styles - there is no my template.
But in Extensions->Template manager->Templates - my template exists.
Discover button has no effect.
So i decided that my template is broken and download free template from siteground(siteground-j16-25.zip). And it says 'Installing template was successful.' again, but there is no template in Template manager->Styles.
So i decided to install Joomla and that template to another platform:
Apache + MySQL + PHP 5.3
And it installed successfuly.
So i decided that something wrong with database query and i was right.
When i installing template on SQLSRV (MS SQL SERVER) this file are using:
\libraries\joomla\installer\adapters\template.php line 263
Code: Select all
if ($this->route == 'install')
{
//insert record in #__template_styles
$query = $db->getQuery(true);
$query->insert('#__template_styles');
$query->set('template=' . $db->Quote($row->element));
$query->set('client_id=' . $db->Quote($clientId));
$query->set('home=0');
$debug = $lang->setDebug(false);
$query->set('title=' . $db->Quote(JText::sprintf('JLIB_INSTALLER_DEFAULT_STYLE', JText::_($this->get('name')))));
$lang->setDebug($debug);
$query->set('params=' . $db->Quote($row->params));
$db->setQuery($query);
// There is a chance this could fail but we don't care...
$db->query();
}
Code: Select all
INSERT INTO #__template_styles
SET template=N'mytemplate'
, client_id=N'0'
, home=0
, title=N'mytemplate - Default'
, params=N'{}'
It only have INSERT INTO ... VALUES statement
So i think it is real bug, and it must be fix.
Sorry for my english