Support closed from the 8 August 2022 to the 19 August 2022

The support will be closed.

We will come back the 22 August 2022.

Best regards.

Search in support tickets

#965 – advanced search by ad_vectormap

Posted in ‘Support’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Tuesday, 28 September 2021 10:01 CEST
In advanced search I can select several provinces. It seems very logical to me because you can search in your province and surroundings. But the sql that it generates does it with "LIKE".

SELECT adext. *, FROM .... WHERE ... AND (a.ad_vectormap LIKE '% [{"code": "ES-M", "name": "Madrid"}, {"code" : "ES-TO", "name": "Toledo"}, {"code": "ES-GU", "name": "Guadalajara"}]% ') AND ... GROUP BY
this sql should look something like this:
AND (a.ad_vectormap IN ('% {"code": "ES-M", "name": "Madrid"}%', '% {"code": "ES-TO", "name": "Toledo "}, '% {" code ":" ES-GU "," name ":" Guadalajara "}%')
to collect the three provinces.

If it is not possible, how to make the election of the provinces only be able to choose one?
Custom Fields
Joomla Version
PHP Version
Product Version
Wednesday, 29 September 2021 09:21 CEST

You are free to custom the code if you like, however it is not part of the support.

Regarding you message, I need to take a look at the code.
The vector map plugin hasn't needed a change in a long time, so I will run some test.

Best regards.
Wednesday, 29 September 2021 13:57 CEST
It is simply that in advanced search you can choose two or more provinces, but in the search it does not filter ads that are in those provinces, but rather it filters by ads that all the selected provinces owe. And it is impossible.
Friday, 01 October 2021 09:45 CEST

Ok, if it does that then this is clearly an issue.

I will take a look.

Best regards.
Friday, 01 October 2021 17:20 CEST

Ok there is a mistake in the plugin.

Open the file images/com_adsmanager/plugins/vectormap/plug.php

And replace, line 167:
//$values = json_decode($value);
$values = $value;

$values = json_decode($value);
//$values = $value;

Best regards.
Thursday, 07 October 2021 14:04 CEST
Perfect. It works.
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.