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

Null entity on multiple-select list filter #103

Closed
AaronGilMartinez opened this issue Aug 25, 2021 · 1 comment · Fixed by #152
Closed

Null entity on multiple-select list filter #103

AaronGilMartinez opened this issue Aug 25, 2021 · 1 comment · Fixed by #152

Comments

@AaronGilMartinez
Copy link
Contributor

Dear colleagues,

I've found an issue in the component that throws a PHP error.

The error is related to multi-select filter and is triggered when the multi-select tries to load an entity and returns a NULL.

Steps to reproduce:

  1. Install clean
  2. Enable field UI
  3. Enable extra field
  4. Enable Database Search
  5. Clear cache
  6. Add content types: test and sub-test
  7. Add reference field in test pointing to sub-test
  8. Show extra fields on list content type display: results, filters, ...
  9. Add a search API server: default
  10. Add a content index with the content type test on the default server.
  11. Add a field to the index using the referenced field sub-test title
  12. Add a facet for the title with the previous field and set the widget to multi-select.
  13. Create content for sub-tests and tests
  14. Create a list page with the test bundle and filter.

Now if a user tries to filter the list page on view the site crashes.

Proposed solution:
#102

Could you review this, please?

Thanks!
BR,
Aaron Gil

@imanoleguskiza
Copy link
Member

Issue can be reproduced if you try to filter using an entity that does not exist anymore. While difficult to achieve a user could potentially save a url with certain filters on and cause this.

upchuk added a commit that referenced this issue Aug 17, 2022
Issue #103: Prevent passing a null variable when loading entity reference labels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants