Skip to content

json type field not being populated into admin form #8956

@u007

Description

@u007

Bug report

When we are trying to save a json field via postman, the data get saved. I'm able to retrieve the value via postman, but it does not seems to be populating into the admin form

Describe the bug

Steps to reproduce the behavior

  1. create a collection with a field with type json
  2. use this axios to save the data:
axios.post('http://localhost:1337/aaas', {
  name: 'test2'
      }).then(({data}) => {
  console.debug("got it!", data);
   axios.put(`http://localhost:1337/aaas/${data.id}`, {
          stuff: { xxxxxx: 2, another: 'aa' }  ,
        }) 

});
  1. use postman to retrieve the data from HTTP://localhost:1337/aaas (working)
  2. edit the record in admin, didn't work

Expected behavior

json text should reveal in form.

the same problem occurs when editing/adding a record via the admin form, the record gets the correct value saved, but the data is not being populated back into the form

System

  • Node.js version:
  • NPM version: 12.20.0
  • Strapi version: 3.4.0
  • Database: mysql
  • Operating system: popos 20.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions