Skip to content

DataONE portal view says some listed portals don't exist #2874

Description

@robyngit

The DataONE portal list can link to portal documents that the portal view cannot find. For example, with the DataONE theme, /portals lists ORNL Terrestrial Ecosystem Science - SFA Data Portal and links to /portals/TES-SFA_Portal. Opening that link displays:

The data portal "TES-SFA_Portal" doesn't exist.

To reproduce

  1. Run MetacatUI with the DataONE theme.
  2. Go to /portals.
  3. Open ORNL Terrestrial Ecosystem Science - SFA Data Portal.
  4. See the "doesn't exist" error.

Expected behaviour

A public portal listed on /portals should load when its link is opened.

Details

The list and detail views search for portals differently. The portal list's POST request uses the CN query service. PortalModel.getSeriesIdByLabel() instead searches only the configured alternate repositories when they are present. In the DataONE theme, those repositories are UCSB, Arctic, and KNB.

The label query (label:"TES-SFA_Portal" OR seriesId:"TES-SFA_Portal") returns no results from those three repositories. The DataONE CN returns five indexed versions, with series ID urn:uuid:f8a1d44c-8eb5-4431-b3c8-6cba86b6bd7e and datasource urn:node:ESS_DIVE. Because the detail lookup never queries the CN, it exhausts the alternate repositories and triggers notFound.

There is a second problem after the label is resolved. PortalModel.url() can replace the DataONE resolver with the globally active alternate repository, which is UCSB by default. The UCSB object request for this portal returns 404, while the DataONE resolver redirects to ESS-DIVE and the ESS-DIVE object request succeeds.

The detail lookup should query the query service first, then try alternate repositories for portals that may not be indexed on the CN. Portal object reads should use the repository matching the resolved datasource, or the object/resolve service when that repository is not configured. The active repository used for uploads should not override where an existing portal is read from.

Related: #2839 covers duplicate portal versions in the list, and #1823 covered another DataONE read incorrectly sent to mn-ucsb-1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugportalsAnything related to portals

Type

Projects

  • Status
    In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions