Psychoanalytic-Electronic-Publishing / PEP-Web-User-Interface

Single Page App Graphical User Interface for PEP-Web
1 stars 0 forks source link

PEP Prev / Next Volume supplemental issue error #713

Closed nrshapiro closed 1 year ago

nrshapiro commented 1 year ago

This may be the case I saw and reported in a bug report I can't find now that I think we dismissed because it was not easily replicable. But I can replicate this easily here.

1) Looking at the Table of Contents of a volume which has a Supplement issue, e.g., IJP.034 2) Click on one of the articles in the supplement [Note: right now there's a new data problem, that crept in, so supplement issues may not always be marked--that's fixed but needs to wait until we propagate the data. But the supplement restarts page numbering and can be found easily at the bottom of the volume TOC for IJP.034] 3) Now click on the article title to go back to the TOC.

BUG: The volume navigation controls at the top of the contents show briefly then disappear. There's no volume number either at the top. as there normally is.

Trace: The data for the volume navigation comes from the server, when the TOC api call supplies moreinfo=2. I've verified it's present in both the normal case and the abberrant case from IJP 034S. In other words, both

/v2/Metadata/Contents/IJP/34/?year=%2A&moreinfo=2&limit=200&offset=0" and /v2/Metadata/Contents/IJP/34S/?year=%2A&moreinfo=2&limit=200&offset=0"

produce this response, with the necessary supplemental info

{
  "documentList": {
    "responseInfo": {
      "count": 198,
      "limit": 200,
      "offset": 0,
      "fullCount": 198,
      "fullCountComplete": true,
      "listType": "documentlist",
      "supplementalInfo": {
        "infosource": "volumes_adjacent",
        "prev_vol": {
          "value": "33",
          "count": 104
        },
        "matched_vol": {
          "value": "34",
          "count": 198
        },
        "next_vol": {
          "value": "35",
          "count": 154
        }
      },
...

@jordanallen-dev

ocappello commented 1 year ago

Glad to hear we're sorting out the marking of supplement volumes!

Please address

jordanallen-dev commented 1 year ago

@nrshapiro

Just looked at this

It's as a result of the change in volume ID

When navigating back from the title on a supplementary issue, you are taken to the volume with an "S" suffix

For example

pep-web.org/browse/IJP/volumes/34 -> Navigate to supplementary and back -> pep-web.org/browse/IJP/volumes/34S

When the volume ToC is loaded, it searches the list of volumes in the journal for one matching the "volume number" (34 / 34S) . In the case of 34S, no matching volume is found and the volumeInformation variable is undefined

When the volumeInformation variable is undefined, the arrows are not displayed:

image

Two solutions:

  1. We don't care if volumeInformation is defined and instead check if there is either a meta.supplementalInfo.prev_vol or meta.supplementalInfo.next_vol
  2. We change the data so it doesn't link back to 34S and instead links back to 34

Question for you. What is the purpose of the "S" suffix, and do we lose anything by removing it from the data?

https://www.notion.so/Volume-navigation-arrows-disappear-when-returning-from-supplementary-articles-df53483e25f8464a8322a9854e49f9ca?pvs=4

cc: @ocappello

nrshapiro commented 1 year ago

@jordanallen-dev

34S is a supplement

You'll see it at the bottom, the last issue listed for 34.

In traditional, some journal breaks it fashion, "S" is always supplement, except for FA