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

Search in Localisation tab does not work #875

Closed
2 tasks done
satrun77 opened this issue Aug 19, 2024 · 1 comment
Closed
2 tasks done

Search in Localisation tab does not work #875

satrun77 opened this issue Aug 19, 2024 · 1 comment

Comments

@satrun77
Copy link
Contributor

Module version(s) affected

7.1.3

Description

The search functionality of the grid field in the Localisation tab does not work.

The error

[Emergency] Uncaught TypeError: SilverStripe\ORM\Search\SearchContext::prepareQuery(): Argument #3 ($existingQuery) must be of type ?SilverStripe\ORM\DataList, SilverStripe\ORM\ArrayList given, called in /Users/mo/Sites/immigration-nz/vendor/silverstripe/framework/src/ORM/Search/SearchContext.php on line 162

The issue is with the return data type from https://github.com/tractorcow-farm/silverstripe-fluent/blob/7/src/Extension/Traits/FluentObjectTrait.php#L69 is ArrayList

How to reproduce

  1. Install a fresh installation
  2. Add fluent module
  3. Setup locales
  4. Add a page for all of the created locales
  5. Edit a page
  6. Go to Localisation tab
  7. Use the search functionality within the grid field.
  8. You should get a server error window popup, and inspecting the network console shows the error received from the server

Possible Solution

Remove GridFieldFilterHeader from GridFieldConfig in https://github.com/tractorcow-farm/silverstripe-fluent/blob/7/src/Extension/Traits/FluentObjectTrait.php#L161

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
@satrun77
Copy link
Contributor Author

Fixed in #876

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

1 participant