ASIKOO Posted August 7, 2022 Posted August 7, 2022 Hi, I wanted to test the REST API to issue a warning without using the IPS software. As soon as I add a second parameter to the API, I get an error. I think the API needs to be updated because of the 4.7.0 (or another) version which adds new features, like achievement points. Using only the "moderator" parameter, the warning is issued without any information about the reason (which is normal). API REST $post = [ 'reason' => 15, // Reselling //'points' => 100, // (Optional) Use default reason points //'memberNote' => 'Member MSG', // (Optional) //'moderatorNote' => 'Staff MSG', // (Optional) //'acknowledged' => false, // (Optional) //'modQueue' => null, // (Optional) //'restrictPosts' => null, // (Optional) //'suspend' => null, // (Optional) //'expire' => null, // (Optional) 'moderator' => 26583, // Bot Account ]; API Error test.php:42:string '{ "errorCode": "EX1048", "errorMessage": "UNKNOWN_ERROR" }' (length=66) IPS Error Message INSERT INTO `MD_core_members_warn_logs` ( `wl_date`, `wl_member`, `wl_moderator`, `wl_expire_date`, `wl_points`, `wl_cheev_point_reduction`, `wl_reason`, `wl_note_member`, `wl_note_mods`, `wl_acknowledged`, `wl_content_app`, `wl_content_module`, `wl_content_id1`, `wl_content_id2`, `wl_suspend` ) VALUES ( 1659878338, 27304, 26583, -1, 100.0, NULL, '15', 'Member MSG', NULL, '', NULL, NULL, NULL, NULL, -1 ) Column 'wl_cheev_point_reduction' cannot be null Sincerly, ASIKOO
Marc Posted August 8, 2022 Posted August 8, 2022 In the first instance, please check with "acknowledged" set, as that is not showing as nullable in the documentation.
ASIKOO Posted August 8, 2022 Author Posted August 8, 2022 8 hours ago, Marc Stridgen said: In the first instance, please check with "acknowledged" set, as that is not showing as nullable in the documentation. According to the documentation, only the "moderator" field is required (according to oauth or api rest). By sending the following parameters, a warning is issued : 'acknowledged' => true, // (Optional) 'moderator' => 26583, // Bot Account By sending the following parameters, no warning is issued. 'acknowledged' => false, // (Optional) 'moderator' => 26583, // Bot Account With this error : test.php:42:string '{ "errorCode": "EX1366", "errorMessage": "UNKNOWN_ERROR" }' (length=66) And : INSERT INTO `MD_core_members_warn_logs` ( `wl_date`, `wl_member`, `wl_moderator`, `wl_expire_date`, `wl_points`, `wl_reason`, `wl_note_member`, `wl_note_mods`, `wl_acknowledged`, `wl_content_app`, `wl_content_module`, `wl_content_id1`, `wl_content_id2` ) VALUES ( 1659974386, 27304, 26583, -1, 0, 0, NULL, NULL, '', NULL, NULL, NULL, NULL ) Incorrect integer value: '' for column `metin2_dev`.`MD_core_members_warn_logs`.`wl_acknowledged` at row 1 As soon as I set the "reason" parameter, I get the errors of the first message. test.php:42:string '{ "errorCode": "EX1048", "errorMessage": "UNKNOWN_ERROR" }' (length=66) And : INSERT INTO `MD_core_members_warn_logs` ( `wl_date`, `wl_member`, `wl_moderator`, `wl_expire_date`, `wl_points`, `wl_cheev_point_reduction`, `wl_reason`, `wl_note_member`, `wl_note_mods`, `wl_acknowledged`, `wl_content_app`, `wl_content_module`, `wl_content_id1`, `wl_content_id2`, `wl_suspend` ) VALUES ( 1659878338, 27304, 26583, -1, 100.0, NULL, '15', 'Member MSG', NULL, '', NULL, NULL, NULL, NULL, -1 ) Column 'wl_cheev_point_reduction' cannot be null The API seems not to allow to control the field: wl_cheev_point_reduction
ASIKOO Posted September 20, 2022 Author Posted September 20, 2022 Hi, The problem is still relevant with the latest version of the software (4.7.2.1) : Sincerly, ASIKOO
Solution Marc Posted April 4, 2023 Solution Posted April 4, 2023 This issue has been resolved in our recently released 4.7.9 version. Please upgrade if you are seeing this issue, and let us know if you see any further issues.
ASIKOO Posted April 4, 2023 Author Posted April 4, 2023 7 hours ago, Marc Stridgen said: This issue has been resolved in our recently released 4.7.9 version. Please upgrade if you are seeing this issue, and let us know if you see any further issues. I confirm, it works better haha
Recommended Posts