This is a follow-up to #3077815: Basic Search (such as on Title) on Pull Form, where basic search was added.
If there are no filters specified on a channel (other than Entity Type and Bundle, which are required), then the basic search fails to work.
To reproduce:
- Create a new channel. Select an entity type and bundle.
- Add no filters, sorts, or any other configuration to the channel.
- Visit the pull content form, select that site and channel.
- Enter a search term, tab-out to have it search.
A PHP notice will be thrown:
Notice: Undefined index: filter in Drupal\entity_share_client\Form\PullForm->buildEntitiesSelectTable() (line 491 of /app/drupal8/web/modules/contrib/entity_share/modules/entity_share_client/src/Form/PullForm.php). =>
And the search will fail to work.
This can be mitigated just by specifying any filter, such as "created > 0"
Comment | File | Size | Author |
---|---|---|---|
#3 | entity_share-search_fails-3087500-3.patch | 1.15 KB | Grimreaper |
Comments
Comment #2
GrimreaperComment #3
GrimreaperHello,
Here is a patch that fixes the bug.
Is it ok for you?
I will wait for your feedback before merging.
Comment #4
quicksketchWorks great.
Comment #6
GrimreaperThanks for the feedback. This is merged!