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

Facet rebuild fails when date item processor is enabled. #189

Open
brummbar opened this issue Jul 28, 2023 · 1 comment
Open

Facet rebuild fails when date item processor is enabled. #189

brummbar opened this issue Jul 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@brummbar
Copy link
Contributor

When using the date item processor to change the granularity of date fields, an error occurs after submitting the search form with one date selected.

TypeError: DateTime::setTimestamp(): Argument #1 ($timestamp) must be of type int, string given in DateTime->setTimestamp() (line 360 of core/lib/Drupal/Component/Datetime/DateTimePlus.php).
call_user_func_array() (Line: 360)
Drupal\Component\Datetime\DateTimePlus->__call() (Line: 263)
Drupal\facets\Plugin\facets\query_type\SearchApiDate->calculateResultFilterAbsolute() (Line: 254)
Drupal\facets\Plugin\facets\query_type\SearchApiDate->calculateResultFilter() (Line: 76)
Drupal\facets\QueryType\QueryTypeRangeBase->build() (Line: 94)
Drupal\facets\Plugin\facets\query_type\SearchApiDate->build() (Line: 141)
Drupal\oe_list_pages\ListBuilder->rebuildFacet() (Line: 71)
Drupal\oe_list_pages\ListBuilder->getDefaultFilterValuesLabel() (Line: 492)

How to reproduce:

  1. Enable the test module oe_list_pages_filters_test.
  2. Edit a date facet (e.g. the one on the created field).
  3. Apply the date item processor.
  4. Create a list page, expose the filter.
  5. Select one value for it and submit.
@brummbar
Copy link
Contributor Author

Related OEL ticket: OEL-2418.

@brummbar brummbar added the bug Something isn't working label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant