What's the purpose of the data in the json field?

Created on 10 July 2024, 6 months ago
Updated 30 July 2024, 5 months ago

Problem/Motivation

When saving a Media Entity, some json data is saved in the JSON field on the Drupal media entity.
It isn't clear what this is actually used for, if anything?
So is this data stored, but never actually used?
(Which isn't a problem, per se, just want to understand what the situation is)

💬 Support request
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇪Ireland alanburke

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

Comments & Activities

  • Issue created by @alanburke
  • 🇮🇪Ireland alanburke

    I can see that the JSON data is used when determing whether the element is a Video element, and hence needs the Video player.

    Is there any guide to how to create the 'data' that is stored in the JSON?
    It doesn't match the 2 API calls that are made. I assume it is generated inside the Keepicker element?

  • Indeed, the JSON is stored in order to determine the nature of the media during rendering and adapt the HTML component to use (image or video).
    That being said, this behavior will evolve, and it is preferable for the moment not to use or rely on this JSON.
    This JSON is constructed by the Keepicker, and for this, we rely on several API responses from our DAM.

    It is complex to try to recreate this JSON.

    What do you need?

  • 🇮🇪Ireland alanburke

    Thanks keepeek_dam
    We're working on a migration routine and want to ensure we create the elements correctly.
    We have enough information now to continue so I will close this.

  • Status changed to Fixed 5 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024