Restoring backup should change assets to current version in richtext

I have…

  • [] Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [X] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

When you restore app from backup assets which you added in richtext editor have old urls (app-id and their uuid).

Expected behavior

Assets which you added in richtext should be changed for new ones.

Minimal reproduction of the problem

  1. Create an app
  2. Create a schema with string field and rich text editor
  3. Upload asset
  4. Add new content to this schema and insert asset
  5. Create backup
  6. Restore backup with new name
  7. Delete original app and get 404 on image

Environment

  • [X] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: [4.4.0.0]

Browser:

  • [X] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

Same grapql call:

{
  queryAssets {
    id
  }
  queryTestSchemaContents {
    id
    flatData {
      description
    }
  }
}

Original app response:

{
  "data": {
    "queryAssets": [
      {
        "id": "79e55460-4352-4ac1-a674-e077aad8c33d"
      }
    ],
    "queryTestSchemaContents": [
      {
        "id": "34320a22-32f4-4bb8-93c6-f5874d067af8",
        "flatData": {
          "description": "<p><img src=\"https://localhost/api/assets/test-asset/79e55460-4352-4ac1-a674-e077aad8c33d/test.png\" alt=\"test.png\" /></p>"
        }
      }
    ]
  }
}

Restored from backup app response:

{
  "data": {
    "queryAssets": [
      {
        "id": "35f4754b-b796-4baf-a1bc-122f9b681248"
      }
    ],
    "queryTestSchemaContents": [
      {
        "id": "a5e5d1d3-358a-48c3-a3cc-3e268bcae9a6",
        "flatData": {
          "description": "<p><img src=\"https://localhost/api/assets/test-asset/79e55460-4352-4ac1-a674-e077aad8c33d/test.png\" alt=\"test.png\" /></p>"
        }
      }
    ]
  }
}

I read a few topics about assets and backups. I understand that you set new id to every item, but I think the app and asset id should be replaced in this string text field where you use richtext and insert assets.

Do you plan do something with that?

Greetings

Yes, perhaps with v5, when the ids stay consistent.