Error after installing.

Phoca Maps - displaying maps in Joomla! CMS
arctellion
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 05 Sep 2025, 15:15

Error after installing.

Post by arctellion »

Code: Select all

500 42601, 7, ERROR: syntax error at or near "`" LINE 2: FROM `tst_phocamaps_map` AS a ^ 42601, 7, ERROR: syntax error at or near "`" LINE 2: FROM `tst_phocamaps_map` AS a ^
Hi I'm new to Phoca & Joomla. I'm running a clean version of Joomla 5.3.3 on an Apache2 with Postgresql 14 server. After installing the component I goto any of the options and I get the error above. I have also installed the plugin just in case that was the issue. I'm using Phocamaps v5.0.2

Is there anything I'm doing wrong? Any other settings or options that are needed for it to work?
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9846
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Error after installing.

Post by Benno »

Hi,
please enable Joomla! Debug Mode and set Joomla! Error Reporting=Maximum to get a more detailed error message (Call Stack) and post this error message here.

Thank you, kind regards,
Benno
arctellion
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 05 Sep 2025, 15:15

Re: Error after installing.

Post by arctellion »

The error trace as requested ..

Code: Select all

An error has occurred.
500 42601, 7, ERROR: syntax error at or near "`" LINE 2: FROM `tst_phocamaps_map` AS a ^ 42601, 7, ERROR: syntax error at or near "`" LINE 2: FROM `tst_phocamaps_map` AS a ^

Call Stack
#	Function	Location
1	()	JROOT/administrator/components/com_phocamaps/views/phocamapsmaps/view.html.php:53
2	PhocaMapsCpViewPhocaMapsMaps->display()	JROOT/libraries/src/MVC/Controller/BaseController.php:697
3	Joomla\CMS\MVC\Controller\BaseController->display()	JROOT/administrator/components/com_phocamaps/controller.php:51
4	phocaMapsCpController->display()	JROOT/libraries/src/MVC/Controller/BaseController.php:730
5	Joomla\CMS\MVC\Controller\BaseController->execute()	JROOT/administrator/components/com_phocamaps/phocamaps.php:35
6	require_once()	JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
7	Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()	JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
8	Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()	JROOT/libraries/src/Component/ComponentHelper.php:361
9	Joomla\CMS\Component\ComponentHelper::renderComponent()	JROOT/libraries/src/Application/AdministratorApplication.php:150
10	Joomla\CMS\Application\AdministratorApplication->dispatch()	JROOT/libraries/src/Application/AdministratorApplication.php:205
11	Joomla\CMS\Application\AdministratorApplication->doExecute()	JROOT/libraries/src/Application/CMSApplication.php:304
12	Joomla\CMS\Application\CMSApplication->execute()	JROOT/administrator/includes/app.php:58
13	require_once()	JROOT/administrator/index.php:32
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48975
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error after installing.

Post by Jan »

Hi, hard to say, but it seems, there is a problem directly in the database query, unfortunately, Phoca Maps is not tested in Postgresql, only in MariaDB or MySQL, so maybe this is related to this problem :idea:

Jan
If you find Phoca extensions useful, please support the project
arctellion
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 05 Sep 2025, 15:15

Re: Error after installing.

Post by arctellion »

I've figured out part of the problem. The databases were not created, I have fixed that by converting the MySQL into PostgreSQL the tables are now there, I just need to work through the application code to find the MySQL where the problem is being caused.

Once I've isolated the issue in the code I'll let you guys know, so I can let you have the PostgreSQL Fixed code, if you want it of course :D
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48975
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error after installing.

Post by Jan »

OK, thank you.

Jan
If you find Phoca extensions useful, please support the project
arctellion
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 05 Sep 2025, 15:15

Re: Error after installing.

Post by arctellion »

I have solved it ..

PostgreSQL doesn't accept the backtick (`) surrounding the database name in the code there are 2 lines in each of the admin modules.. where the backtick is used.

In phocamapsmaps.php it's line 100 & 104
In phocamapsicons.php it's line 95 & 99
In phocamapsmarkers.php it's line 108 & 112

I don't know if you can check what database is being used by Joomla, if so you'd need to add in the lines for that as well as coding up the removal of the backtick. I've only checked the admin side at the moment, I'm not sure if it will also be there in the front facing side i.e. the plugin as well.

What's the best way to get the SQL for the database creation to you?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48975
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error after installing.

Post by Jan »

Hi, just let me know the full paths of the files so I can change them in next release:

https://github.com/PhocaCz/PhocaMaps/issues/11

Thank you, Jan
If you find Phoca extensions useful, please support the project
arctellion
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 05 Sep 2025, 15:15

Re: Error after installing.

Post by arctellion »

Having provided the fixes. Unfortunately I've had to move to MySQL as so few, if any, developers of exertions, paid or otherwise, have tested their extension against PostgreSQL, and tell me that it's not supported. Which is a shame.

I've updated the github issue with the path and line numbers for the files, I have also added the SQL to the issue as well. Sorry for being a pain, with the PostgreSQL issues.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48975
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error after installing.

Post by Jan »

Hi, thank you for the info, yes, in case the SQL queries should be added for PostgreSQL, the new folder and file should be created in install folder. The file which exists for now is ready for mysql only.

And yes, unfortunately, it is hard to maintain some database which is a minor database. For example, I don't have it installed (if I would test different databases which are used e.g. by 1% of users, I would be never able to make ready so much Joomla extensions). :-(

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