doublesecretagency / craft-googlemaps

Google Maps plugin for Craft CMS - Maps in minutes. Powered by the Google Maps API.
https://plugins.doublesecretagency.com/google-maps/
Other
10 stars 10 forks source link

Plugin doesnt work in Craft cms v4.9.5 #111

Closed mufi-siebird closed 5 months ago

mufi-siebird commented 6 months ago

There is this updates craft cms made:

Scalar element queries now set $select to the scalar expression, and $orderBy, $limit, and $offset to null, on the element query. (#15001) ...

I guess because of that, plugin throws order by distance error and not loads the data.

Error I recieve is: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'distance' in 'having clause'

Query:

{% set query = craft.entries.section("mapsection").mapAddress(params).limit(limit) %}
{% if pagination %}
    {% paginate query as pageInfo, entries %}
{% else %}
    {% set entries = query.all() %}
{% endif %}
nickdenys commented 6 months ago

We're also having this issue with the exact same error.

Craft CMS version: 4.9.5 Plugin version: 4.5.2

mufi-siebird commented 6 months ago

We're also having this issue with the exact same error.

Craft CMS version: 4.9.5 Plugin version: 4.5.2

I solved it by downgrading craft cms to 4.9.4 for now.

nickdenys commented 6 months ago

@mufi-siebird Cheers, that made it work again 👍

lindseydiloreto commented 6 months ago

Thank you both for reporting it. We'll take a look shortly to see if the fix should be on our side, or within Craft core (since that's what changed).

elivz commented 5 months ago

I'm seeing this as well. Have downgraded to 4.9.4 for the moment, but following here for a permanent fix.

brandonkelly commented 5 months ago

Craft 4.10.2 and 5.2.2 are out with a fix for this.

lindseydiloreto commented 5 months ago

Brilliant, thanks @brandonkelly! 🙏 🎉