1

I'm currently prototyping a project in Drupal 8. I'm posting HAL json to /entity/node with the relevant headers to create nodes. I'm including translations as per this example:

{

"_links":{ "type":{"href":"https://localtest/rest/type/node/page"} },

"title":[{"value":"posted title en","lang":"en"}, {"value":"posted title de","lang":"de"}, {"value":"posted title fr","lang":"fr"}],

"body":[{"value":"posted body en","lang":"en"}, {"value":"posted body de","lang":"de"}, {"value":"posted body fr","lang":"fr"}]

}

This creates the node and the 2 translations. However, only the english version gets the title and body. Any other language just get the relevant language's body and a blank title. I have tried this with an admin account to rule out permissions problems. I have manually added the translations to make sure titles are translatable and work.

Does anybody know why the titles are lost for translations when posting nodes?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.