2

I have a section called "Musicians" which is already set up and populated. It has an unpopulated "Albums" Matrix field which will hold each artist's albums.

I have exported the albums as a separate JSON file. Now I like to import them into the existing "Musicians" section's Matrix field.

But my three test album entries fail to get added to the corresponding artist.

I've assigned the correct JSON fields to the matrix, but I'm not sure how to connect each album with the existing artist – adding the artist Title field or title slug in FeedMe doesn't do the job.

What am I missing?

Here is a sample JSON structure:

{  
  "title":"Milyakburra",
  "url_title":"milyakburra",
  "album_artist_relate":[  
     {  
        "entry_id":"2590",
        "title":"Emily Wurramara",
        "url_title":"emily-wurramara"
     }
  ],
  "album_release_date":"2018-06-01",
  "album_description":"",
  "album_tracks_1":"Lady Blue\nMilyakburra\nNgarrikwujeyinama\nCarry Me Home\nBlack Smoke\nLullaby\nHey Love\nTap Sticks\nYimenda-Papaguneray (Turtle Song)\nBlue Moon, Black Sea\nBlack Boy",
  "album_tracks_2":"",
  "album_cover":"/images/uploads/resources/music/emily-wurramura_milyakburra.jpg",
  "album_fishpond_link_id":"",
  "album_amazon_link_id":"",
  "album_itunes_link_album_name":"milyakburra/1388866633"
},

Edit: It looks like FeedMe has difficulties finding a match between a musician entry's title field and the album_artist_relate title field. If I manually add a new title field at the top of the structure (and rename the existing one to "title2") FeedMe correctly inserts the data into the matrix.

1 Answer 1

1

It seems that FeedMe cannot process such JSON objects as it needs them to be cleaner.

I ended up doing a lot of PHP processing of my exported data until it had the below format. With that FeedMe was happy.

{  
  "title":"Emily Wurramara",
  "album":[  
     {  
        "album_release_date":"2017-02-08",
        "album_description":"",
        "album_tracks_1":"Hey Love",
        "album_tracks_2":"",
        "album_cover":"emily-wurramura_hey-love.jpg",
        "album_amazon_link_id":"",
        "album_itunes_link_album_name":"hey-love-single/1203932967",
        "album_title":"Hey Love (Single)"
     },
     {  
        "album_release_date":"2017-02-22",
        "album_description":"",
        "album_tracks_1":"Hey Love Me Too",
        "album_tracks_2":"",
        "album_cover":"emily-wurramura_hey-love.jpg",
        "album_amazon_link_id":"",
        "album_itunes_link_album_name":"hey-love-single/1203932967",
        "album_title":"Hey Love (Me Too)"
     }
  ]
},

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.