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

The "Scholar Directory" link won't work for many instances #4

Open
McFateM opened this issue Mar 4, 2021 · 1 comment
Open

The "Scholar Directory" link won't work for many instances #4

McFateM opened this issue Mar 4, 2021 · 1 comment

Comments

@McFateM
Copy link
Member

McFateM commented Mar 4, 2021

The "Scholar Directory" link leads to a hard-coded Solr query that assumes all profiles are part of an islandora:person collection. That is not the case in many instances, in Digital.Grinnell our profiles are part of an islandora:entity_collection so my "Scholar Directory" will always be empty as-written.

I suggest a better query would be:

/**
 * Redirects to search
 */
function islandora_scholar_profile_directory() {
  drupal_goto('islandora/search/RELS_EXT_hasModel_uri_s:(info\:fedora\~slsh~islandora\:personCModel)');
} 

This query (the snippet above is from my copy of islandora_scholar_profile.module) only assumes that you want to return all objects that use the personCModel, so it does not depend on creation of a specific collection.

@McFateM
Copy link
Member Author

McFateM commented Mar 4, 2021

Note that I did not submit this change as a PR because I am working from a fork of the project, and because I'm not sure if other elements of this module might also require a specific islandora:person collection. Thus far I haven't encountered anything else that needs to be that specific.

@bookishgirl Thought you might be interested in this too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant