bondjimbond / islandora_metadata_extras

Islandora utility module that provides some options for customizing metadata display and generation.
GNU General Public License v3.0
6 stars 2 forks source link

500 error when no results #35

Closed bondjimbond closed 4 years ago

bondjimbond commented 4 years ago

After #31 was merged, Islandora returns a 500 error when searching for a term that yields no results.

This only happens when the new setting is enabled. Search https://arcabc.ca for a nonsense string (e.g. adofijpaseoijf) and you get a 500 error.

Weirdly, with exactly the same Metadata Extras configuration in Vagrant, there's no problem. But my Vagrant modules aren't necessarily as up to date as production.

Can you help diagnose?

mjordan commented 4 years ago

What is appearing in your apache logs for these 500 errors? Anything in the Drupal watchdog?

bondjimbond commented 4 years ago

No logs at all.

The error occurs when this line is executed: https://github.com/mjordan/islandora_metadata_extras/blob/7.x/islandora_metadata_extras.module#L129

I'm trying to figure out a way to skip this line if there is nothing returned, but struggling.

bondjimbond commented 4 years ago

Also, these two lines seem superfluous: https://github.com/mjordan/islandora_metadata_extras/blob/7.x/islandora_metadata_extras.module#L127-L128

facet_field_configured is just a string; I cannot remember why I added an explode() function to it. There's no colon in the field name.