Template is not displayed in the Styles

The support for Joomla 2.5 ended on December 31, 2014. Possible bugs in Joomla 2.5 will not be patched anymore. This forum has been closed. Please update your website to Joomla 3.x

Moderators: ooffick, dam-man

Forum rules
Please use the official Bug Tracker to report a bug: http://issues.joomla.org
medved45
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Jan 24, 2008 3:51 pm

Template is not displayed in the Styles

Postby medved45 » Wed Feb 01, 2012 3:26 am

I am using Windows 7 Ultimate, IIS + PHP 5.3 + SQL SERVER 2008 R2
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();
      }


I got a variable $query=

Code: Select all

INSERT INTO #__template_styles
SET template=N'mytemplate'
   , client_id=N'0'
   , home=0
   , title=N'mytemplate - Default'
   , params=N'{}'


But MS SQL SERVER do not have INSERT INTO ... SET statement!!!!
It only have INSERT INTO ... VALUES statement
So i think it is real bug, and it must be fix.
Sorry for my english

Return to “Joomla! 2.5 Bug Reporting”

Who is online

Users browsing this forum: No registered users and 3 guests