weixin_39604983
weixin_39604983
2020-11-26 09:18

Can only update one repeater field at a once???

Hi,

Im having a load of trouble with 2 repater fields.

I added my first RF and added the filter to my functions.php file. Then tested the fields through Postman and it worked as expected, fields updated.

Then i added another RF to the same group and added the filter to my functions.php file. then tested the api call in Postman and it updated as expected.

Then i went back to the first repeater field and tried the call again and im now getting a {\"code\":\"cant_update_item\",\"message\":\"Cannot update item\",\"data\":{\"status\":500}}

but the second RF is still working. Please can someone help iv been going round in circles for days.

Thanks

Nick

acf functions.zip

该提问来源于开源项目:airesvsg/acf-to-rest-api

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

8条回答

  • weixin_39604983 weixin_39604983 4月前

    Please can you help with this issue.

    Best wishes

    Nick

    点赞 评论 复制链接分享
  • weixin_40008920 weixin_40008920 4月前

    Hi ,

    Please, check those links below. http://airesgoncalves.com.br/acf-to-rest-api/ ( tab repeater ) https://github.com/airesvsg/acf-to-rest-api-example

    Thanks

    点赞 评论 复制链接分享
  • weixin_39604983 weixin_39604983 4月前

    Hi

    Thank you for your reply.

    I have read through evey bit of documentation and its still not working. I have 2 repeater fields, on 1 site, with the filters in functions.php to make the repeater fields editable by REST. The problem im having is only one filter seems to work at a time. I have recreated this problem on a blank wordpress just using the plugins required and a basic theme and im still getting the same issue. I cant for the life of me figure out whats going wrong.

    I also have another site with 5 repeater fields and REST works fine. No issues. I then took that theme with the setting that worked and im getting the same issue as the problem above. I hope iv explained well enogh, if you require any more info ill get it sent over asap.

    Wordpress - Version 4.9.6 ACF Pro - Version 5.6.10 - V3 not V2 ACF to REST - Version 3.1.0 JSON Basic Authentication - Version 0.1 WP REST API - Version 2.0-beta15

    Many thanks

    Nick

    点赞 评论 复制链接分享
  • weixin_39604983 weixin_39604983 4月前

    Hi

    I dont mean to bug you but im really lost to what this issue could be.

    I could really do wityh your help.

    Thnaks

    点赞 评论 复制链接分享
  • weixin_40008920 weixin_40008920 4月前

    Can you send me your files and database dump?

    My email is: airesvsg.com

    Thanks

    点赞 评论 复制链接分享
  • weixin_39604983 weixin_39604983 4月前

    I have sent it all over.

    Thank you for your time and help

    点赞 评论 复制链接分享
  • weixin_39604983 weixin_39604983 4月前

    Hey

    ANy luck?

    Best wishes

    Nick

    点赞 评论 复制链接分享
  • weixin_40008920 weixin_40008920 4月前

    Hi , Follow the steps below:

    1. Remove the filter "acf/rest_api/key" in your functions.php
    2. Update your fields ( Custom Fields > Tools > Import Field Groups > acf-export-2018-06-21.json ). You forgot the sub-field name on field group me.
    3. Copy the content of the file repeater.json and paste on Postman - Change Text to JSON (application/json) on Body tab ( Screenshot from 2018-06-21 10-48-03.png ).

    Files: acf-to-rest-api-issue-250.zip

    Thanks

    点赞 评论 复制链接分享