Keyword

SQL Error while trying to save K2-Category

  • OASE Software GmbH
  • OASE Software GmbH's Avatar Topic Author
  • Offline
  • Junior Member
More
4 years 2 months ago #174760 by OASE Software GmbH
SQL Error while trying to save K2-Category was created by OASE Software GmbH
dear team!

after i click on save-button while editing existing oder creating new k2-category i get the following error:

Es ist ein Fehler aufgetreten!

1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 1' at line 1
JROOT/libraries/joomla/database/driver/mysqli.php:665

Call stack
# Function Location
1 () JROOT/libraries/joomla/database/driver/mysqli.php:665
2 JDatabaseDriverMysqli->execute() JROOT/libraries/joomla/database/driver.php:1740
3 JDatabaseDriver->loadResult() JROOT/plugins/k2/swmap/v2.php:121
4 plgK2swmap->prepareItem() JROOT/plugins/k2/swmap/base.php:343
5 SWMapsBase->onAfterK2Save() JROOT/libraries/joomla/event/event.php:70
6 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
7 JEventDispatcher->trigger() JROOT/administrator/components/com_k2/models/category.php:138
8 K2ModelCategory->save() JROOT/administrator/components/com_k2/controllers/category.php:27
9 K2ControllerCategory->save() JROOT/administrator/components/com_k2/controllers/category.php:39
10 K2ControllerCategory->apply() JROOT/libraries/src/MVC/Controller/BaseController.php:710
11 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_k2/k2.php:147
12 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
13 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
14 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101
15 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159
16 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:196
17 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/index.php:51

a little digging resulted that in JROOT/plugins/k2/swmap/v2.php on line 120 where the following code is listed the $item->catid is empty:
$db->setQuery("SELECT alias FROM #__k2_categories WHERE id = {$item->catid} LIMIT 1");

this occures on joomla v3.9.15 with k2 in version 2.10.2, 2.10.1 and 2.10.0 but not on 2.9.0, in this version no error occures?

could you tell me if this bug is allready known and/or when it will be solved?

cheers daniel

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

More
4 years 2 months ago #174779 by JoomlaWorks
Replied by JoomlaWorks on topic SQL Error while trying to save K2-Category
I can only assume the plugin "swmap" is pretty outdated and won't work with the latest version of K2 or possibly your server's PHP if it's been upgraded. If this is a plugin for easily embedding maps, there are many alternatives out there. And even if you don't like one, you can always create a "textarea" type extra field and just embed maps as iframes.

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

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

More
4 years 2 months ago #174818 by Jennie Dawson
Replied by Jennie Dawson on topic SQL Error while trying to save K2-Category
None of the Styleware K2 extensions have been supported since 2016, including swmap. I used to have some of their extensions and have had to phase them out when the developers stopped communicating and bringing out updates. Up to then they were great, apart from SWtabs which was very buggy.

I have recently reported their extensions as abandonware so hopefully they will be taken off the Joomla site soon.

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

More
4 years 2 months ago #174821 by JoomlaWorks
Replied by JoomlaWorks on topic SQL Error while trying to save K2-Category
Thanks for letting us know.

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

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

  • OASE Software GmbH
  • OASE Software GmbH's Avatar Topic Author
  • Offline
  • Junior Member
More
4 years 2 months ago #174849 by OASE Software GmbH
Replied by OASE Software GmbH on topic SQL Error while trying to save K2-Category

Fotis wrote: If this is a plugin for easily embedding maps, there are many alternatives out there.

i have searched a while but could not find any map except styleware to show a map of k2 articles with geo locations of a category and all subcategories and jump to article after clicking map-marker.
can you recommend a few to me?

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

More
4 years 2 months ago #174863 by JoomlaWorks
Replied by JoomlaWorks on topic SQL Error while trying to save K2-Category
I would say the best one is from JoomReem: www.joomreem.com/extensions-store/jr-maps-for-k2

Fotis / 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