Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Location plugin throws an error on filters on OctoberCMS v3.5.14 #106

Open
salahassi opened this issue Feb 6, 2024 · 1 comment
Open

Comments

@salahassi
Copy link

Please refer to this topic on October Talk.
https://talk.octobercms.com/t/using-rainlabs-location-plugin-throws-an-error-on-filters/2224

Hello,

I have a project that depends on countries in their entries. So, I used Rainlab’s Locations plugin; it worked fine in terms of showing the countries in a dropdown, selecting them, and even showing them in the data table. However, when filtering by country, an error gets thrown as shown:

"Call to a member function methodExists() on null" on line 237 of /Users/salahassi/dev/sada/october/modules/backend/filterwidgets/Group.php

The error is here at line 237 ($model is null):
image

And here is how I define it in the Tailor Blueprint:

    country:
        label: Country
        type: dropdown
        options: RainLab\Location\Behaviors\LocationModel::getCountryOptions
        select: name
        placeholder: Select an option

I tried to create a custom scope with no luck.

I appreciate any solution or workaround that might help.

Thanks

@daftspunk
Copy link
Member

Related discussion: https://talk.octobercms.com/t/using-rainlabs-location-plugin-throws-an-error-on-filters/2224

Leaving this open since a tailor content field would be useful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants