pulibrary / special_collections

Deprecated - Special Collections ( formerly RBSC) Drupal 7 Project
https://library.princeton.edu/special-collections/
GNU General Public License v2.0
2 stars 0 forks source link

Collection pages missing Holdings info for certain search results #497

Closed sdellis closed 7 years ago

sdellis commented 8 years ago

When the search term is present in one of the Holdings descriptions, it properly returns the collection, but Holdings info is missing. To reproduce, try searching for "Papyri" and then try searching for "Princeton University Library Papyrus Home Page" and click on the collection result. The holdings data should be identical.

kevinreiss commented 8 years ago

Are we talking about following the links from these two result pages?

https://rbsc.princeton.edu/find/all/Papyri vs. https://rbsc.princeton.edu/find/all/Princeton%20University%20Library%20Papyrus%20Home%20Page

I seem to remember this has come up before. Isn't due to some weirdness with a workaround looking at the referring URL for a string for the context that drives the missing holdings listing?

https://github.com/pulibrary/rbsc_drupal/blob/master/sites/all/themes/rbsc/assets/source/scripts/rbsc.behaviors.js#L74

Am I remembering this correctly?

kevinreiss commented 8 years ago

In the latter URL, the content is actually part of the page but I believe is hidden due to the js I referenced in my last comment? What was the purpose of that code? Maybe we should just git rid of it.

sdellis commented 8 years ago

The purpose of that code is to present the holdings information that is contextually relevant to how you got to the collection (or topic) page. For example, if you click on that search result and multiple divisions have holdings for the collection, then you want the holdings information that has your search term to be visible. Likewise, if a division lists Photography as a collection strength on it's page, you don't want another divisions holdings presented after a click through.

The use case for grouping the holdings under topics and collections is that someone interested in American Literature, may want to know that other RBSC divisions have content that may be relevant to their research.

Yes, you are remembering this correctly, and the code you point to doesn't take the search results into account. It was something of a temporary solution, and perhaps we need a more robust approach to supporting this behavior.

sdellis commented 8 years ago

It's not a complete solution, but making the default (first) tab always visible if there's only one would fix this in the majority of searches since much of the holdings info is still not complete as some divisions haven't migrated/added them from old guides and finding aids. To be fair, this was supposed to be the next phase of the RBSC website project, which it seems we have started on to some degree.

kevinreiss commented 8 years ago

I don't understand. The search result is a "collection" page. Why wouldn't you want to see a list of all "holdings" attached that collection.

sdellis commented 8 years ago

Yes, of course. But "active tab" would ideally be the one that contained your search terms. The collection page can be a result when the search term is in one of it's holdings descriptions. If you want, I can try to fix this so that there is never "missing" content, even if the appropriate tab is not always active when coming from the search results.