Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 4, 2024Oct 4 According to the docs, sending out author param as 0 means post as guest (with author_name as his name) However when I try to post a comment as guest, I get "errorCode": "1F295/2", "errorMessage": "NO_AUTHOR". If I try to use an ID of an actual existing user instead of 0 - it's working fine. I am 99% sure this worked in the past (a few years ago) so maybe something changed? Just to make sure this is not a permissions issue I verified that the forum I'm trying to post to have commenting permissions for guests (even though I don't think it needs to have it in order to post via the API). Am I missing something?
October 4, 2024Oct 4 Author I checked the source code, based on the 400 response code I understand that this is the relevant code from CommentController: I debugged the code and found out that \IPS\Request::i()->author was indeed 0, but as a string (as always with POST fields). And since you are using === to check explicitly against an int, it failed. I manually changed it to if ( intval(\IPS\Request::i()->author) === 0 ) and now it's working fine. But manually changing core files is obviously not something I should do, so please fix this in the official code (both V4 and V5?)... Thanks Edited October 4, 2024Oct 4 by Omri Amos
October 4, 2024Oct 4 Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.
October 18, 2024Oct 18 Author On 10/4/2024 at 3:03 PM, Daniel F said: Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release. Can you please confirm that/if it is fixed on IPS v5 beta?
October 18, 2024Oct 18 38 minutes ago, Omri Amos said: Can you please confirm that/if it is fixed on IPS v5 beta? This will be fixed in the next beta!