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

Uncaught TypeError: Cannot read property 'hasOwnProperty' of null #29

Open
ghost opened this issue Oct 13, 2020 · 0 comments
Open

Uncaught TypeError: Cannot read property 'hasOwnProperty' of null #29

ghost opened this issue Oct 13, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 13, 2020

I have a filter with options as shown below which works perfect when browsing entries. However when I use this filter in a field with the fieldtype "entries" to select related articles it gives me the error as shown at the bottom of this issue.

Filter options:

{% for category in craft.categories.group('interests').all() %}
    {{ ({
        filter: {
            relatedTo: {
                element: category.id,
            }
        },
        label: category.title
    })|json_encode() }}{{ not loop.last ? ',' }}
{% endfor %}

Error code:

ElementFilters.js?v=1586255504:238 Uncaught TypeError: Cannot read property 'hasOwnProperty' of null
    at ElementFilters.js?v=1586255504:238
    at Array.forEach (<anonymous>)
    at updateCriteriaValue (ElementFilters.js?v=1586255504:235)
    at ElementFilters.js?v=1586255504:217
    at Array.forEach (<anonymous>)
    at updateCriteria (ElementFilters.js?v=1586255504:216)
    at HTMLDivElement.filterHandler (ElementFilters.js?v=1586255504:286)

95874083-d078ad80-0d70-11eb-8316-75b016619fc2

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

0 participants