[Solved] SQL Error in Control Panel in 2.0.1

Threads related to Joom!Fish 2.0.x that were already resolved
Forum rules
Do not start new topics in this forum. This forum is for threads that are resolved and moved from the bug reporting forum.

Re: SQL Error in Control Panel in 2.0.1

Postby LTJ on Sat Feb 07, 2009 11:41 pm

Once again hello.

As I mentioned I still have the same error as dino and not the 1064 above.
When removing (like dino pointed out) the collate is the way to resolve the error, it would be nice to have an "official" statement what exactly to do and why the database tables are missing (dino is missing them as well) causing the issue.

What's the intention of the SQL code if it can be removed !?

Some more light on this would be really helpful ...

Thanks,
Joe
Experience is that marvelous thing that enables you to recognize a mistake when you make it again.
User avatar
LTJ
Newbee
 
Posts: 2
Joined: Mon Feb 02, 2009 4:53 pm

Re: SQL Error in Control Panel in 2.0.1

Postby infograf768 on Sun Feb 08, 2009 8:56 am

As far as I understand , the COLLATE statement is not necessary anyway as this table is (should be!) created on an already utf8 collated db.

Change in
administrator/components/com_joomfish/classes/JCacheStorageJFDB.php

around line 110
Code: Select all
. "\n ) CHARACTER SET utf8 COLLATE utf8_general_ci";

to
Code: Select all
. "\n ) CHARACTER SET utf8";
infograf768
Newbee
 
Posts: 25
Joined: Wed Mar 12, 2008 6:52 pm

Re: SQL Error in Control Panel in 2.0.1

Postby spiteful_troll on Mon Mar 16, 2009 10:47 pm

Hi.
Unfortunately solutions which were suggested here don't wokr for me.

My trouble:

In Control Panel appears such message:

"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHARACTER SET utf8' at line 8 SQL=CREATE TABLE IF NOT EXISTS `jos_dbcache` ( `id` varchar ( 32 ) NOT NULL default '', `groupname` varchar ( 32 ) NOT NULL default '', `expire` datetime NOT NULL default '0000-00-00 00:00:00', `value` MEDIUMBLOB NOT NULL default '', PRIMARY KEY ( `id`,`groupname` ), KEY ( `expire`,`groupname` ) ) CHARACTER SET utf8
CREATE TABLE IF NOT EXISTS `jos_dbcache` ( `id` varchar ( 32 ) NOT NULL default '', `groupname` varchar ( 32 ) NOT NULL default '', `expire` datetime NOT NULL default '0000-00-00 00:00:00', `value` MEDIUMBLOB NOT NULL default '', PRIMARY KEY ( `id`,`groupname` ), KEY ( `expire`,`groupname` ) ) CHARACTER SET utf8 "

My parameters:

JoomFish 2.0.2
Joomla 1.5.9
PHP erstellt für: Linux asklepios.ispgateway.de 2.6.27.7-grsec #25 SMP Mon Feb 16 16:37:38 CET 2009 i686
Datenbankversion: 3.23.58-log
Datenbanksortierung: N/A (mySQL < 4.1.2)
PHP-Version: 5.2.6
Webserver: Apache/1.3 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.8f AuthPG/1.3 FrontPage/5.0.2.2635

Help me please.
Thank you very much!
spiteful_troll
Newbee
 
Posts: 3
Joined: Mon Jun 30, 2008 10:42 am

Re: SQL Error in Control Panel in 2.0.1

Postby baigtsa on Sat Jul 11, 2009 6:13 am

PROBLEM:
I got a 500 when accessing Control Panel (2.02)
JDatabaseMySQL::query: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where key_name = 'jfContent'' at line 1 SQL=show index from jos_jf_content where key_name = 'jfContent'



SOLUTION:

Change administrator/components/com_joomfish/helpers/controllerHelper.php at line 109
-----------------------------------------------------------------------------
FROM:
-----------------------------------------------------------------------------
Code: Select all
      if (!isset($data['jfContent'])){
         $sql = "ALTER TABLE `#__jf_content` ADD INDEX `combo` ( `reference_id` , `reference_field` , `reference_table` )" ;
         $db->setQuery($sql);
         $db->query();      
         $sql = "ALTER TABLE `#__jf_content` ADD INDEX `jfContent` ( `language_id` , `reference_id` , `reference_table` )" ;
         $db->setQuery($sql);
         $db->query();
         $sql = "ALTER TABLE `#__jf_content` ADD INDEX `jfContentLanguage` (`reference_id`, `reference_field`, `reference_table`, `language_id`)" ;
         $db->setQuery($sql);
         $db->query();
         
      }

-----------------------------------------------------------------------------
TO:
-----------------------------------------------------------------------------
Code: Select all
      if (!isset($data['combo'])){
         $sql = "ALTER TABLE `#__jf_content` ADD INDEX `combo` ( `reference_id` , `reference_field` , `reference_table` )" ;
         $db->setQuery($sql);
         $db->query();
      }
      if (!isset($data['jfContent'])){         
         $sql = "ALTER TABLE `#__jf_content` ADD INDEX `jfContent` ( `language_id` , `reference_id` , `reference_table` )" ;
         $db->setQuery($sql);
         $db->query();
      }
      if (!isset($data['jfContentLanguage'])){
         $sql = "ALTER TABLE `#__jf_content` ADD INDEX `jfContentLanguage` (`reference_id`, `reference_field`, `reference_table`, `language_id`)" ;
         $db->setQuery($sql);
         $db->query();
         
      }

-----------------------------------------------------------------------------
Alex Baigts.
baigtsa
Newbee
 
Posts: 1
Joined: Sat Jul 11, 2009 6:06 am

Re: SQL Error in Control Panel in 2.0.1

Postby caro84g on Sat Jul 11, 2009 11:09 am

Hi,

are you posting a hack for an outdated version of Joom!Fish?

We're at 2.0.3 now

Regards, Carolien
Joom!Fish club members can get priority support at the support forums and have access to extra addons and pre-releases. So join the club today!

You need more Joomla Support? May be Open Source Support Desk can help you!
User avatar
caro84g
Contributor
 
Posts: 1861
Joined: Wed Aug 27, 2008 2:28 pm

Re: SQL Error in Control Panel in 2.0.1

Postby plusangel on Thu Oct 29, 2009 8:00 pm

baigtsa's modification working in 2.0.4 version as well.

I had the same problem with control panel.

thanks :)
plusangel
Newbee
 
Posts: 1
Joined: Thu Oct 29, 2009 7:58 pm

Previous

Return to Joom!Fish 2.0.x Stable Solved Threads

Who is online

Users browsing this forum: No registered users and 2 guests