lajax / yii2-translate-manager

Translation Manager
MIT License
227 stars 90 forks source link

Cannot save translated content #141

Closed lenhattung closed 4 years ago

lenhattung commented 4 years ago

When I click on the save button, I see an "X" error. No rows are saved to the database.

Please help me to fix the error.

Error
moltam commented 4 years ago

Could you check the log for the AJAX request in the Yii debug toolbar? There should be an error entry there, that will describe what happened.

lenhattung commented 4 years ago

Dear Moltam,

I reconfigure the LanguageController file with the following content: public function behaviors () { return [ 'ghost-access' => [ 'class' => 'webvimark \ modules \ UserManagement \ components \ GhostAccessControl', ], ]; }

I have debugged and seen everything OK. Can't see any error from Yii2 debugging tool. (Attached photo). I still cannot store the translated content into the database. I am looking forward to your help.

1 2
lenhattung commented 4 years ago

Dear sir,

This is my error: {"id":["ID is invalid."],"language":["Language is invalid."]}

lenhattung commented 4 years ago

No matter which button I press on, I always see data like this: {"id": 0, "language": "en", "translation": ""}

lenhattung commented 4 years ago

Thank you very much, I have changed the translate.js content: helpers.get ($ ('# language_id'). data ('url'), data);

Now everything is working fine.