"hook" parameter doesn't work in PodioItem::update API.

Comments

4 comments

  • 汪雨

    I change ['hook'=>false] to array('hook'=>false), the problem is solved. So I think the podio api can not recognize php 5.4's [] array syntax.

    0
    Comment actions Permalink
  • 汪雨

    The problem is not solved. Some time ago, I made a syntax to my hook code to force stop the loop update process. After that I change my code to the old array syntax, I saw there is no loop update process, so I thought the problem is solved. In fact my code is not invoke because of syntax error.
    After I remove the syntax error, the loop update process emerge again, you can see this in item 147190402.

    0
    Comment actions Permalink
  • 汪雨

    In Podio Tutorials - Working with Webhooks -> Avoiding infinite loops
    It says:
    "Often you want to update the item that caused the hook to fire. For example immediately update a field value when some other field value changes. That can cause infinite loops where your update causes yet another hook to fire.
    To avoid this situation the add new item, update item and delete item operations all support a hook query parameter you can use to prevent hooks from firing as you manipulate items using these operations."
    Since podio said "update item" can handle with the "hook" query parameter, I don't know if my code is wrong, this is my code:
    PodioItem::update($manager_item_id,array('fields'=>$emp_item_fields),array('hook'=>false));
    Is there something wrong with my code?

    0
    Comment actions Permalink
  • Giorgian Dinu

    Hi, 6 years later and I'm dealing with the same problem, my code look exactly like yours, $options=array('hook'=>false); It doesn't work for me either, can anybody from the Podio team answer why this doesn't work ?

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk