Closed LasseRafn closed 4 years ago
Getting the following when using the push command:
push
Writing translations in the spreadsheet In REST.php line 118: { "error": { "code": 400, "message": "Invalid JSON payload received. Unknown name \"0\" at 'data.values': Cannot find field.\nInvalid JS ON payload received. Unknown name \"1\" at 'data.values': Cannot find field.\nInvalid JSON payload received. Unkno wn name \"2\" at 'data.values': Cannot find field.\nInvalid JSON payload received. Unknown name \"3\" at 'data.val ues': Cannot find field.\nInvalid JSON payload received. Unknown name \"4\" at 'data.values': Cannot find field.\n Invalid JSON payload received. Unknown name \"5\" at 'data.values': Cannot find field.\nInvalid JSON payload recei ved. Unknown name \"6\" at 'data.values': Cannot find field.\nInvalid JSON payload received. Unknown name \"7\" at 'data.values': Cannot find field.\nInvalid........
I tried editing TranslationsSheet.php -> writeTranslations and added:
TranslationsSheet.php -> writeTranslations
$translations = array_values($translations);
And now it works.. I think it is because the package gives array keys as strings ("0", "1") but after array_slice it turns into integers.
@LasseRafn solution worked for me as well. The PR is still open.
Getting the following when using the
push
command:I tried editing
TranslationsSheet.php -> writeTranslations
and added:And now it works.. I think it is because the package gives array keys as strings ("0", "1") but after array_slice it turns into integers.