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

URL: Pretty Faces URL with Dataverse Alias Bugs #1111

Closed
kcondon opened this issue Nov 13, 2014 · 13 comments
Closed

URL: Pretty Faces URL with Dataverse Alias Bugs #1111

kcondon opened this issue Nov 13, 2014 · 13 comments
Assignees
Labels
Type: Bug a defect UX & UI: Design This issue needs input on the design of the UI and from the product owner

Comments

@kcondon
Copy link
Contributor

kcondon commented Nov 13, 2014

When you add/ display a dataverse on the featured dataverse area, the urls are the former, non pretty types.

@kcondon kcondon added UX & UI: Design This issue needs input on the design of the UI and from the product owner Priority: Medium Type: Bug a defect labels Nov 13, 2014
@kcondon kcondon added this to the Beta 9 - Dataverse 4.0 milestone Nov 13, 2014
@scolapasta
Copy link
Contributor

Also in the header.

@scolapasta scolapasta assigned mheppler and unassigned scolapasta Nov 13, 2014
@scolapasta
Copy link
Contributor

Assigned to @mheppler as these should be straightforward changes in the xhtml pages.

@mheppler mheppler changed the title URL: Alias pretty url is not used in featured dataverse links. URL: Pretty Faces URL with Dataverse Alias Bugs Nov 20, 2014
@mheppler
Copy link
Contributor

I've found a few issues related to Pretty Faces URLs, not just the Featured Dataverse links. Here are my notes.

  • The only place that is correctly applying Pretty Faces URLs are the "#{result.name} Dataverse" links in the dataverse cards on search-include-fragment, which uses "#{dataversePage}?alias=#{result.dataverseAlias}".
  • That #{dataversePage} references a ui:param from Line 207: name="dataversePage" value="#{dataverseLinksStayOnPage == true ? '' : '/dataverse.xhtml' }" -- no idea what "dataverseLinksStayOnPage" means, and why it's there. Phil seems to think it's from the Data Related To Me view of search-include-fragment.
  • Using: "/dataverse.xhtml?alias=#{dv.alias}" -- or some version of it -- doesn't work anywhere else, ie., dataset cards or the Featured Dataverse widget on dataverse.xhtml.
  • The breadcrumbs on dataverse_header.html also do not have the Pretty Faces URL format.
  • In total 7 pages use "dataverse.xhtml?id", which I found using a search in the project source are: DatasetPage.java, DataversePage.java, dataset.xhtml, dataverse.xhtml, dataverse_header.xhtml, dataverseuser.xhtml, widgets.js.

@mheppler mheppler assigned rtreacy and unassigned mheppler Nov 20, 2014
@scolapasta scolapasta modified the milestones: Beta 11 - Dataverse 4.0, Dataverse 4.0: Final Jan 23, 2015
@scolapasta scolapasta assigned mheppler and unassigned rtreacy Jan 23, 2015
@scolapasta scolapasta added this to the Beta 12 - Dataverse 4.0 milestone Jan 23, 2015
@scolapasta scolapasta modified the milestones: Beta 14 - Dataverse 4.0, In Review - Dataverse 4.0 Feb 20, 2015
@mheppler
Copy link
Contributor

The following pages all reference "dataverse.xhtml", and will need to be individually review, so as to consistently use the Pretty Faces URLs for dataverses, across the entire site.

  • AdvancedSearch.java
  • dataset.xhtml
  • dataverse.xhtml
  • dataverseuser.xhtml
  • widgets.js
  • themeAndWidgetsFragment.xhtml (doesn't use "dataverse.xhtml", but creates URLs that use id, which the widgets.js uses)

mheppler added a commit that referenced this issue Feb 24, 2015
…, rather than id. Changed markup of highlighted search terms, to look a little cleaner in the browse/search cards. [ref #1111]
mheppler added a commit that referenced this issue Feb 24, 2015
…, to use alias, rather than id, to utilize the Pretty Faces URL. [ref #1111]
mheppler added a commit that referenced this issue Feb 24, 2015
…ith the URLs used for dataverses around the site. [ref #1111]
@mheppler
Copy link
Contributor

AdvancedSearch.java, dataset.xhtml, dataverse.xhtml, dataverseuser.xhtml, widgets.js, themeAndWidgetsFragment.xhtml -- were all easy changes from id to alias. The rest will require review with a developer.

I am editing this list to be two parts. The above pages are easy, these next pages are more complicated.

  • DatasetPage.java
  • DataverseHeaderFragment.java
redirectPage = "dataverse.xhtml&alias=" + dataverseService.findRootDataverse().getAlias();
  • DataversePage.java
  • LoginPage.java
redirectPage = redirectPage + "&alias=" + dataverseService.findRootDataverse().getAlias();
  • SearchIncludeFragment.java
dataverseRedirectPage = StringUtils.isBlank(dataverseRedirectPage) ? "dataverse.xhtml" : dataverseRedirectPage;
String optionalDataverseScope = "&alias=" + dataverse.getAlias();

return dataverseRedirectPage + "?faces-redirect=true&q=" + query + optionalDataverseScope;
  • BuiltinUserPage.java
return "/dataverse.xhtml?alias=" + dataverseService.findRootDataverse().getAlias() + "faces-redirect=true;";
  • PasswordResetPage.java
return "/dataverse.xhtml?alias=" + dataverseService.findRootDataverse().getAlias() + "faces-redirect=true";
  • loginpage.xhtml
outcome="/dataverse.xhtml?alias=#{dataverseServiceBean.findRootDataverse().alias}"

Nothing needs to be done for:

  • 404.xhtml ui:param name="loginRedirectPage" is OK having "dataverse.xhtml"
  • 500.xhtml ui:param name="loginRedirectPage" is OK having "dataverse.xhtml"
  • dataverse_header.xhtml ui:param name="dataversePage" are something that doesn't need to be address at this moment
  • passwordreset.xhtml ui:param name="loginRedirectPage" is OK having "dataverse.xhtml"
  • search-include-fragment.xhtml -- the New Dataverse link and ui:param name="dataversePage" are something that doesn't need to be address at this moment

Was not able to fix:

  • Shib.java

mheppler added a commit that referenced this issue Feb 26, 2015
…n order to utilize the Pretty Faces URL. [ref #1111]
@mheppler
Copy link
Contributor

Passing to Gustavo to see if he can fix the use of "dataverse.xhtml" on Shib.java.

private final String homepage = "/dataverse.xhtml";

@mheppler mheppler assigned scolapasta and unassigned mheppler Feb 26, 2015
@scolapasta
Copy link
Contributor

I'm actually going to pass this to @pdurbin, so he can add it how he would prefer (I think the easiest is to just remove the use of homepage and add dataverse.xhtml?alias=XXX in the places it's used).

@pdurbin, can you adjust this? the old way "dataverse.xhtml" is not good enough because it does not go through pretty faces. We have another issue #1519 to track how to do this, but for 4.0 we're just changing all those links to include the alias in the query string for the root (which you can get with the DataverseServieBean.findRootDataverse() method). Let me know if you have any questions.

@scolapasta scolapasta assigned pdurbin and unassigned scolapasta Feb 26, 2015
pdurbin added a commit that referenced this issue Mar 2, 2015
- #1551 was opened to think about how to have Shib users use the
  redirectPage logic
@pdurbin
Copy link
Member

pdurbin commented Mar 2, 2015

As of b6b73f3 Shib users are redirected to the "pretty" URL for the homepage (http://localhost:8080/dataverse/root). There are three possible ways to end up there:

In looking at this @scolapasta and I noticed that Shib users do not benefit from the fancy redirectPage logic developed in #869 for builtin users. We'll decided to open a new ticket at #1551 so that Shibboleth users get feature parity for this feature. For now, Shib users always end up at the homepage, but now it's the "pretty" URL. Passing to QA.

@pdurbin pdurbin removed their assignment Mar 2, 2015
@kcondon kcondon assigned posixeleni and unassigned kcondon Mar 18, 2015
@posixeleni
Copy link
Contributor

@kcondon showed me what I need to test for this.

@posixeleni
Copy link
Contributor

I have tested different workflows indicated by @mheppler and @pdurbin (Shibb) above for getting to a Dataverse page. I'm seeing all pretty dataverse URLs. Including Widgets which takes you to a URL that looks like this: https://dvn-build.hmdc.harvard.edu/dataverse.xhtml?alias=sonia&q=Sonia

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug a defect UX & UI: Design This issue needs input on the design of the UI and from the product owner
Projects
None yet
Development

No branches or pull requests

7 participants