Forum Discussion

cike's avatar
cike
Champion
9 years ago

API v2 list messages from deleted board

Hi guys,

 

I'm building a custom message stream component. To get the messages I'm using API v2. On of my queries looks like this:

 

SELECT * FROM messages WHERE depth = 0 AND conversation.style IN ('forum', 'group') AND conversation.solved = true " + common_order + " LIMIT ${page_size} OFFSET ${offset}

The query response includes a message from a board which was deleted a few months ago. So I get an error while requesting the board information by ID within a nested call:

 

<#assign board = rest("/boards/id/${message.board.id}?restapi.response_style=view").board />

Error: "No board with dispid found"

Could you image why messages from the deleted board are returned by my query?

  • cike - Although I am not sure why this is happening, and it is surely a bug if this is the case. Could you do one thing, create a new board, create few messages in there, delete the board and again run your code to see if the discussions from deleted boards are returned. This is the only way to debug this. Also, check if the board which was deleted earlier was actually "deleted" or just hidden from the view.

     

    To add to this, always use the attempt recover blocks to encounter these kind of issues, just in case if this had happned on live, that could save you.

     

    In case this still doesn't solve the issue, please get in touch with support, might be some bug with your instance.

     

    I hope this helps.