Keyword

Error: 1064 after Joomla 3.0 to 3.1 upgrade

  • Duncan
  • Duncan's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #112920 by Duncan
Joomla 3.0 with K2 2.6.6 on Linux
Upgraded to Joomla 3.1

Now when i try to add a new K2 item I get this:

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 ')}' at line 1 SQL=SELECT `catid` FROM jml_k2_additional_categories WHERE `itemID` = {intval()}

Tried reinstalling K2 but have not been able to get round the error.

Any suggestions please?

TIA
Duncan

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago #112921 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Error: 1064 after Joomla 3.0 to 3.1 upgrade
Hello Duncan,

This table is from another component ,Additional Categories for K2. You can try downgrading until this issue is fixed.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #112922 by Fernando Gamba
Replied by Fernando Gamba on topic Re: Error: 1064 after Joomla 3.0 to 3.1 upgrade
I have a fix!!! :)

look for this line in plugins\k2\k2additonalcategories\k2additonalcategories.php
line: 278
$query = "SELECT `catid` FROM #__k2_additional_categories WHERE `itemID` = {intval($item->id)}";

replace for this snipet:

if (!empty($item) && !empty($item->id)) {
$query = "SELECT `catid` FROM #__k2_additional_categories WHERE `itemID` = {intval($item->id)}";
} else {
$query = "SELECT `catid` FROM #__k2_additional_categories WHERE 1";
}

this will fix the problem after save and create a new one.

hope it helps

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #112923 by Alberto
Perfect it works, i had the same problem

ThankS !!

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #112924 by Mariak Bol
Replied by Mariak Bol on topic Re: Error: 1064 after Joomla 3.0 to 3.1 upgrade
Hi can you help me solve this: I get, Error: 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 'ORDER BY content.created DESC' at line 25 SQL=SELECT content.id AS ID, cats.name AS cat_name, cats.alias AS cat_alias, content.catid AS cat_id, users.name AS author, users.email AS author_email, users.id AS author_id, content_rating.rating_sum AS rating_sum, content_rating.rating_count AS rating_count FROM gg1qt_k2_items AS content LEFT JOIN gg1qt_k2_categories AS cats ON cats.id = content.catid LEFT JOIN gg1qt_users AS users ON users.id = content.created_by LEFT JOIN gg1qt_k2_rating AS content_rating ON content.id = content_rating.itemID WHERE ORDER BY content.created DESC

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 10 months ago #112925 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Error: 1064 after Joomla 3.0 to 3.1 upgrade
Please upgrade to the latest version of K2.
Also you can try repairing your database tables.

PS. Always backup before doing anything.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #112926 by Mariak Bol
Replied by Mariak Bol on topic Re: Error: 1064 after Joomla 3.0 to 3.1 upgrade
Hi, I have the latest K2 which is v2.6.7

Thanks

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 10 months ago #112927 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Error: 1064 after Joomla 3.0 to 3.1 upgrade
Have you tried reinstalling K2, or repairing your db's tables?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #112928 by Mariak Bol
Replied by Mariak Bol on topic Re: Error: 1064 after Joomla 3.0 to 3.1 upgrade
Yes the database is ok and I have k2 installed in the template i bought. Should I uninstall and reinstall again?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 10 months ago #112929 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Error: 1064 after Joomla 3.0 to 3.1 upgrade
No do not uninstall, you will lose your content. Just reinstall on top.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum