SQL error 1064 with Phoca Maps 3.0.1

Phoca Maps - displaying maps in Joomla! CMS
aalkier
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 05 Feb 2016, 16:17

SQL error 1064 with Phoca Maps 3.0.1

Post by aalkier »

Hi there,

I would like to ask for your assistance in getting a "SQL error 1064" solved, I am facing with Phoca Maps component.

This is my environment:
Joomla 3.4.8
PHP 5.6
MySQL 5.5.47
Phoca Maps 3.0.1

Installation of the component was successful. Next I defined a map and created a menu entry, pointing to the compoment.

When selecting the menu entry for the map, I receive a SQL error 1064.
Asking Goolge teached me that there is a syntax error in the SQL statement.
Ok so for, but the heck can I edit the SQL statement?

Unfortunately all the results, I found where old and dealt with Joomla 1.x..

All other components are working without any issues. (e.g. Phoca Galery, Phoca Downloads or jEvent.....you name it)

This is the full error message: ( with highlighted syntax 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 'AND categories.published = 1 ORDER BY content.created DESC' at line 28 SQL=SELECT categories.title AS cat, content.id AS ID, content.access AS access, categories.title AS cat, users.email AS author_email, users.name AS author, content_rating.rating_sum AS rating_sum, content_rating.rating_count AS rating_count, categories.id AS CID FROM as002031_content AS content LEFT JOIN as002031_categories AS categories ON categories.id = content.catid LEFT JOIN as002031_content_frontpage AS frontpage ON content.id = frontpage.content_id LEFT JOIN as002031_users AS users ON users.id = content.created_by LEFT JOIN as002031_content_rating AS content_rating ON content_rating.content_id = content.id WHERE AND categories.published = 1 ORDER BY content.created DESC


Any idea on how to get this error solved is high welcome.

Thanks in advance
Alex
christine
Phoca Hero
Phoca Hero
Posts: 2737
Joined: 28 Nov 2010, 17:20

Re: SQL error 1064 with Phoca Maps 3.0.1

Post by christine »

Hi Alex,

hmmm. just some ideas:

a) try to: check & "repair the database" (in backend)

b) the failure: "content_rating ON content_rating.content_id = content.id .... " should not be the reason of phoca items.

c) could be: http://forum.joomla.org/viewtopic.php?f=706&t=840376
The technical problem is that there are no conditions specified in the WHERE clause. Look at the modules published for the home menu item and system plugins. One of them might produce this faulty sql. Unpublish/disable it.
d) May be you need phocamap plugin: https://www.phoca.cz/documentation/categ ... aps-plugin

Kind regards, Christine
aalkier
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 05 Feb 2016, 16:17

Re: SQL error 1064 with Phoca Maps 3.0.1

Post by aalkier »

Hi Christine,

thx for your quick response!
a) didn't bring any changes. It tok the database about 1 or 2 seconds before it reports "success"
b) cannot comment on this, as a newby
c) Yes. agree. This is exactly the SQL syntax error - the WHERE statement has no argument. It is directly followed by the AND statement
d) That was my conrecn, too. I will the plugin a try.

Anyway in case somebody knows how to fix the SQL issue with the component, you're welcome.

cheers
Alex
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: SQL error 1064 with Phoca Maps 3.0.1

Post by Jan »

Hi, first of all, you need to find which part of your system produces the SQL error:

Code: Select all

SQL=SELECT categories.title AS cat, content.id AS ID, content.access AS access, categories.title AS cat, users.email AS author_email, users.name AS author, content_rating.rating_sum AS rating_sum, content_rating.rating_count AS rating_count, categories.id AS CID FROM as002031_content AS content LEFT JOIN as002031_categories AS categories ON categories.id = content.catid LEFT JOIN as002031_content_frontpage AS frontpage ON content.id = frontpage.content_id LEFT JOIN as002031_users AS users ON users.id = content.created_by LEFT JOIN as002031_content_rating AS content_rating ON content_rating.content_id = content.id WHERE AND categories.published = 1 ORDER BY content.created DESC
Some part of your system asks jos_content, jos_content_frontpage tables for titles and other variables.

But this is not Phoca Maps, so try to check all plugins (e.g. system plugins, etc.) and all modules loaded on the same site where Phoca Maps is displayed.

Phoca Maps does not have any such sql query :idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply