Hi @admin,
I have succeeded before in building a wp importer for ACF where I pull in data from an API and then add it in to ACF fields. However I am now trying to do something more complex and I am not sure what what is going on.
I have a content type with standard fields but also some repeater fields using ACF. I can populate the standard fields but from looking at the database your using some kindof ids for each repeater field.
I am also using some relationship fields to make things even more complex.
*An example*
I have a repeater field limited to a maximum of 1, minimum of 1. Within that I have a relationship field.
Looking at my user input-ed test post in which I am basing my import criteria off I have this:
meta_id post_id meta_key meta_value
4005 544 1_0_driver a:1:{i:0;s:3:"256";}
4006 544 _1_0_driver field_5096e4cc6bf31
All I can understand from 4005 is the quotes contain the id of the related post. That's great I thought I'll replicate that and as all my other fields in that post have the same values for a:1:{i:0;S:3:"XXX";} I'll just surround my import data in those values that and replicate the relationships. When I do that I end up with this 5797 601 1_0_driver s:20:"a:1:{i:0;s:3:"136";}"; so it seems to surround that in s:20 and quotes, I don't understand could you shed light on this?
Secondly the row 4006 I can only guess has a connection to a field id or something but I have just been ignoring this row altogether as I did before with standard field which happen to work. I am guessing at some point this might cause and issue?
Lastly I am adding my non relational repeater fields like so: 5803 601 1_0_points 25 but these don't show up either, this might be where the hashed id fields come like my example above row 4006?
I would be excellent if you could help here! Otherwise I won't be able to automate this process and will have add a lot of data manually every time.
Cheers,
James
PS Thanks in advance.
I have succeeded before in building a wp importer for ACF where I pull in data from an API and then add it in to ACF fields. However I am now trying to do something more complex and I am not sure what what is going on.
I have a content type with standard fields but also some repeater fields using ACF. I can populate the standard fields but from looking at the database your using some kindof ids for each repeater field.
I am also using some relationship fields to make things even more complex.
*An example*
I have a repeater field limited to a maximum of 1, minimum of 1. Within that I have a relationship field.
Looking at my user input-ed test post in which I am basing my import criteria off I have this:
meta_id post_id meta_key meta_value
4005 544 1_0_driver a:1:{i:0;s:3:"256";}
4006 544 _1_0_driver field_5096e4cc6bf31
All I can understand from 4005 is the quotes contain the id of the related post. That's great I thought I'll replicate that and as all my other fields in that post have the same values for a:1:{i:0;S:3:"XXX";} I'll just surround my import data in those values that and replicate the relationships. When I do that I end up with this 5797 601 1_0_driver s:20:"a:1:{i:0;s:3:"136";}"; so it seems to surround that in s:20 and quotes, I don't understand could you shed light on this?
Secondly the row 4006 I can only guess has a connection to a field id or something but I have just been ignoring this row altogether as I did before with standard field which happen to work. I am guessing at some point this might cause and issue?
Lastly I am adding my non relational repeater fields like so: 5803 601 1_0_points 25 but these don't show up either, this might be where the hashed id fields come like my example above row 4006?
I would be excellent if you could help here! Otherwise I won't be able to automate this process and will have add a lot of data manually every time.
Cheers,
James
PS Thanks in advance.