Warning: Parameter 1 to wp_default_scripts() expected to be a reference, value given in /www/sites/8af/045/www.soundessence.co.uk/web/wp-includes/plugin.php on line 601
| SoundEssence
Warning: Parameter 1 to wp_default_styles() expected to be a reference, value given in /www/sites/8af/045/www.soundessence.co.uk/web/wp-includes/plugin.php on line 601

Posted by on Sep 22, 2014 in Web | 0 comments

K2 Additional Category issue – (on clean Joomla v3.3.3  installation).

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

Fixed thanks to:

http://getk2.org/community/English-K2-Community/176183-Error-1064-after-Joomla-30-to-31-upgrade

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

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


 

My install isn’t an upgrade, but editing the plugins\k2\k2additonalcategories\k2additonalcategories.php fixed the problem.