Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After a fresh installation of drupal commons 7.x-3.36, I clicked on search button to see the search page. The search page shows the following warning message
Warning: Missing argument 2 for date_facets_get_ranges(), called in profiles/commons/modules/contrib/date_facets/lib/Drupal/Search/Facetapi/QueryType/DateRangeQueryType.php on line 130 and defined in date_facets_get_ranges() (line 84 of /profiles/commons/modules/contrib/date_facets/date_facets.module).
Comment | File | Size | Author |
---|---|---|---|
#2 | date_facets-missing_argument_2-2717091-2-D7.patch | 777 bytes | sukh.singh |
Comments
Comment #2
sukh.singh CreditAttribution: sukh.singh as a volunteer commentedI have found that profiles/commons/modules/contrib/date_facets/lib/Drupal/Search/Facetapi/QueryType/DateRangeQueryType.phpon at line number 130, following code has been written
However under the file profiles/commons/modules/contrib/date_facets/date_facets.module at line 80, main function date_facets_get_ranges function expects second parameter. Second parameter has been checked at line number 83, however the parament has not been provide default value as NULL or empty.
Comment #3
WITTEHOND CreditAttribution: WITTEHOND at 040lab commentedThe solution in this patch provides a default for $index_id this error not to appear.
Patch is made relative to Drupal root not the actual module it patches.