SSHOC / sshoc-marketplace-backend

Code for the backend
Apache License 2.0
2 stars 0 forks source link

Disappearing Thumbnail #437

Open egray523 opened 5 months ago

egray523 commented 5 months ago

I've noticed a repeating issue, where thumbnails will disappear from resources in the MP - I know this because I try to keep up to date on the DARIAH-FR resources that appear in the DARIAH Tools& Services Catalogue. Indeed, I can nearly swear that I have done this in the past for DARIAH-FR resources (so that our T&S Catalogue can be beautiful).

In this case, it is :

PACTOLS (MP link: https://marketplace.sshopencloud.eu/tool-or-service/XBV3Uh/history)

Conservatoire 3D (MP link: https://marketplace.sshopencloud.eu/tool-or-service/MVnVXH/history)

Research has shown that there are indeed older versions with thumbnails, but I can't imagine Sarah or myself having willingly chosen to delete thumbnails when making other updates.

egray523 commented 4 months ago

Dear all,

I have some more feedback - I think I found the issue!

Indeed, as I mentioned in the slack, in adding this new publication (https://marketplace.sshopencloud.eu/publication/zDXc4v) the user suggests a thumbnail, it loads, she submits, I approve it, and it disappears. occurance at 1624 (ish) & 1627 on 29th of February. ANd again, when I put the Celluloid entry up to date by connecting it with Peertube (https://marketplace.sshopencloud.eu/tool-or-service/EgS5M5) around 16:30, it disappeared again

I believe the behavior is related to the changing versions - if the most recent accepted version (aka,t he one I approve as moderator) has it, it works. otherwise, it falls through the cracks and disappears.

mkrzmr commented 2 months ago

I was able to reproduce the bug, and it is part of a larger issue:

Example: {stage}/tool-or-service/qhPNCE/version/52134 - this tool is suggested

  1. Edit and save the draft, add a thumbnail or edit the description. do not publish
  2. go back to the item via the url and the changes are gone

What is happening is that while the PUT is successful:

The API returns a valid response for the update. Take note of the id (60957):

{
    "id": 60957,
    "category": "tool-or-service",
    "label": "test preview",
    "persistentId": "qhPNCE",
    "lastInfoUpdate": "2024-04-12T10:03:21+0000",
    "status": "draft",
    "informationContributor": {
        "id": 4,
        "username": "System importer",
        "displayName": "System importer",
        "status": "enabled",
        "registrationDate": "2021-05-28T15:28:06+0000",
        "role": "administrator",
        "email": "systemimporter@example.com",
        "config": true
    },
    "description": "hcqvouqejbkvf",
    "contributors": [],
    "properties": [
        {
            "type": {
                "code": "keyword",
                "label": "Keyword",
                "type": "concept",
                "groupName": "Categorisation",
                "hidden": false,
                "ord": 18,
                "allowedVocabularies": [
                    {
                        "code": "sshoc-keyword",
                        "scheme": "https://vocabs.sshopencloud.eu/vocabularies/sshomp-keyword/",
                        "namespace": "https://vocabs.sshopencloud.eu/vocabularies/sshomp-keyword/",
                        "label": "Keywords from SSHOMP",
                        "closed": false
                    }
                ]
            },
            "concept": {
                "code": "thisIsInteresting",
                "vocabulary": {
                    "code": "sshoc-keyword",
                    "scheme": "https://vocabs.sshopencloud.eu/vocabularies/sshomp-keyword/",
                    "namespace": "https://vocabs.sshopencloud.eu/vocabularies/sshomp-keyword/",
                    "label": "Keywords from SSHOMP",
                    "closed": false
                },
                "label": "this is/interesting",
                "notation": "",
                "uri": "https://vocabs.sshopencloud.eu/vocabularies/sshomp-keyword/thisIsInteresting",
                "candidate": true
            }
        }
    ],
    "externalIds": [],
    "accessibleAt": [],
    "relatedItems": [],
    "media": [],
    "thumbnail": {
        "info": {
            "mediaId": "3ee1d3da-7097-4d6b-a4d3-df81efee0e81",
            "category": "image",
            "filename": "thumb(1).jpg",
            "mimeType": "image/jpeg",
            "hasThumbnail": true
        }
    }
}

When you look at the URL in the moderation view, the old version (59002) is still referenced.

So the issue is: The curation view does not support versions of drafts properly. The URLs should be updated, but that is not happening at the moment.