The _get_biblio_filters() function runs the set of years from the database through _biblio_text_year() which converts the special values 9998 and 9999 to the value of the biblio_inpress_year_text and biblio_no_year_text variables, respectively. (By default these are "In Press" and "Submitted".)

This causes those values to render as the human readable values in the filter form generated by biblio_form_filter(). However, the translated value is passed to biblio_build_query() which uses the translated value as a database condition.

The result is that the Biblio results page will show all results in the "In Press" or "Submitted" sections when no filters are selected, but choosing one of the filters causes no results to display.

The biblio_build_query() function should run the supplied year value through _biblio_numeric_year() before using it as a database condition value and _biblio_numeric_year() should be updated to take into account custom values for biblio_inpress_year_text and biblio_no_year_text.

(funded through NSF Grant 1507241)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jayroberts created an issue. See original summary.

jroberts’s picture

This patch updates _biblio_numeric_year() to translate custom year text values back to their special numeric values. Is also updates biblio_build_query() to run the supplied year filter value through _biblio_numeric_year() fixing an issue with filtering entries by a custom Year value.