[Updated] Checked the log and found following issue, in the code there is a strtok( get_locale(), '_' ), before passing to hubspot, is this a bug?
Request body: {“formType”:“hubspot”,“name”:“Gravity Forms - GEO \u7db2\u7ad9\u5065\u6aa2 – testing testing ( Do not delete or edit )”,“createdAt”:“2025-12-11T07:05:18+00:00”,“updatedAt”:“2025-12-11T07:05:18+00:00”,“archived”:false,“fieldGroups”:[{“groupType”:“default_group”,“richTextType”:“text”,“richText”:“”,“fields”:[{“name”:“email”,“label”:“Email”,“fieldType”:“single_line_text”,“options”:,“hidden”:false,“objectTypeId”:“0-1”},{“name”:“firstname”,“label”:“First Name”,“fieldType”:“single_line_text”,“options”:,“hidden”:false,“objectTypeId”:“0-1”},{“objectTypeId”:“0-1”,“name”:“hubspot_owner_id”,“label”:“Contact Owner”,“fieldType”:“single_line_text”,“hidden”:true}]}],“configuration”:{“createNewContactForNewEmail”:true,“editable”:true,“postSubmitAction”:{“type”:“thank_you”,“value”:“The form was submitted successfully.”},“language”:“zh”,“prePopulateKnownValues”:false,“cloneable”:true,“notifyContactOwner”:false,“recaptchaEnabled”:false,“archivable”:true,“notifyRecipients”:,“lifecycleStages”:[{“objectTypeId”:“0-1”,“value”:“lead”},{“objectTypeId”:“0-2”,“value”:“lead”}]},“displayOptions”:{“renderRawHtml”:false,“theme”:“default_style”,“submitButtonText”:“Submit”,“style”:null,“cssClass”:“”},“legalConsentOptions”:{“type”:“none”}}
2025-12-11 15:05:18.290877 - ERROR → GF_HubSpot_API::make_request(): API errors returned; Expected response code: 201. Returned response code: 400.; error data: Array
(
[status] => error
[message] => Invalid input JSON on line 1, column 831: Invalid locale supplied zh
[correlationId] => 9bee9266-a19e-49d3-9e97-d7f7dbf75932
[category] => VALIDATION_ERROR
)