Node transform does not update after setting up default transform mode

Created on 23 April 2024, 7 months ago

Problem/Motivation

When setting up default node transform mode for the first time, node transform does not update properly.

Steps to reproduce

  1. Install transform_api
  2. Create node of any content type (page in this example)
  3. Visit transform URL for said content (/node/1?format=json)
  4. Notice that it's using transform mode "full"
  5. Setup default transform mode - add body field for example (/admin/structure/types/manage/page/transform)
  6. Visit transform URL for said content again (/node/1?format=json)
  7. Notice that it's using transform mode "full" despite only default being enabled

Workaround

To fix this issue, clear caches after setting up default transform mode for the first time.

🐛 Bug report
Status

Active

Version

1.0

Component

Transform modes

Created by

🇩🇰Denmark erik_petra

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @erik_petra
  • Status changed to Fixed 7 months ago
  • Status changed to Active 7 months ago
  • 🇩🇰Denmark LupusGr3y

    It only seems to fail if you transform an entity while there are currently no "full" or "default" transform modes configured. It cannot fall back to "default" since the config doesn't exist and it cannot add cache tags for configs that don't exist yet. However, if you then add the "full" transform mode later, it will pick it up.

Production build 0.71.5 2024