Customer Portal

Get Involved. Join the Conversation.


    Raghavendra Karanth
    /ci/ajaxRequest/deleteNotification returns error
    Topic posted April 16, 2019 by Raghavendra Karanth 
    30 Views, 1 Comment
    /ci/ajaxRequest/deleteNotification returns error
    /ci/ajaxRequest/deleteNotification returns error

    We recently migrated our Customer Portal from ver. 3.2 to 3.7. In one of the buttons to "unsubscribe" from Product/Category KB, we are calling the url /ci/ajaxRequest/deleteNotification but it returns 

    "error":"There was a problem with the request and the action could not be completed."

    Payload sent for this POST data are: filter_type, id, rn_contextData, rn_contextToken, rn_timestamp and rn_formToken

    The code was working fine with 3.2. Any idea as to what might be causing this issue? 




    • Raghavendra Karanth

      I was able to solve this. The AJAX controller was looking for the "f_tok" payload in the POST request. I added the below lines in my code to get this working.

      $this->data['js']['f_tok'] = \RightNow\Utils\Framework::createTokenWithExpiration(0); --> in the widget getData function of controller.php 

      f_tok: --> in _onButtonClick function in logic.js file of the widget.

      and for reference, the line of code which changed between the framework version is : if(!$this->checkForValidFormToken())