Dataverse: Dataverse "pretty url" and "regular url" give different search results (48 results vs. 75k+ results)

Created on 27 Jan 2017  路  5Comments  路  Source: IQSS/dataverse

Discovered this when clicking from "mydata" which is using the non-pretty url. (MyData links should be changed regardless of this bug)


to do

  • [ ] fix dataverse page filtering even when using parameterized url (e.g. dataverse id vs alias)
  • [ ] update mydata links to dataverses to use the alias

gary_king_dataverse_and_gary_king_dataverse_and_iqss_geoconnect_and_coffee_-_root_dataverse

My Data Bug

All 5 comments

@raprasad huh. Are you saying you can get to the non-pretty URL by clicking something from the GUI? If so, where?

mydata "cards_minimum.html" has a link to a parent dataverse that's "not pretty"

To fix this, additional data is needed in the JSON for card_info.parentAlias

 {% if card_info.parentId %}
    {% if card_info.parentId != card_info.identifier %}
         -  <a href="/dataverse.xhtml?id={{ card_info.parentId }}">{{ card_info.parentName }} Dataverse</a>
    {% endif %}
 {% endif %}

Other lines in this file are correct, e.g:

  <a href="/dataverse/{{ card_info.identifier }}"><span style="padding:4px 0;">{{ card_info.name }} Dataverse</span></a>

the issue with the non pretty url has to do with the search include fragment not being aware of the dataverse id.

FYI, there is also a nonpretty version of the url that uses alias (what the pretty url maps too). That should work fine. So if you do need to use non pretty urls somewhere, use those.

These links from My Data have been fixed since 4.8.2 fcec2dcd0cf76671742f11d41b5d3f1da5acb71d, but as @scolapasta suggests, logic should be added to the search-include to resolve the incorrect counts/results.

Was this page helpful?
0 / 5 - 0 ratings