Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
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?
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.
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
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
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
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?
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.
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).