About PodioItemDiff::revert issue :revert item back and forth
As my use case :we revert item back by code ,if item is updated (we set up item.update webhook )by the user who should not edit it under my permission .
when a user edit the item ,we called PodioItemDiff::revert to get it back .but we met a issue :
the item was updated back and forth,till system stop it ,please refer to pic in google drive : https://drive.google.com/file/d/0B3JEgK0GXrSSOGd3LWVZOWdCUkk/edit?usp=sharing
Is there any suggestion to revert item back ?
-
It seems that the reason to cause this problem is the podio's PodioItemDiff::revert() api doesn't support ['hook'=>false] parameter, so if you hook the item.update, and calling revert() api in it. when user change item, the hook code would revert the item, but the revert action itself would cause item.update hook event to fire, than it cause the hook code to run again and again, until the rate limit is reached.
I have raised a similar question 2 month ago, but get no reply, I don't know why.
https://help.podio.com/hc/communities/public/questions/201838108-PodioItemDiff-revert-need-a-hook-false-parameter-
This problem is very similar to the comment problem, in that case, podio fixed the bug very quickly.
https://help.podio.com/hc/communities/public/questions/200924647-serious-problem-PodioComment-Create-doesn-t-support-hook-false-parameter-?locale=en-us
Please sign in to leave a comment.
Comments
4 comments