1

I currently have a taxonomy term with multiple translations. When I visit the translate tab for the term it does list all of the languages properly.

enter image description here

However no matter what translation I'm attempting to edit, it takes me to the edit page for English. I found that it seems to automatically send you to the edit page of the translation that matches the user's set Site language.

If I change the site language of the admin user to Spanish no matter what edit link I click it only takes me to the Spanish translation. The admin user has access to all allowed languages so I'm not sure why it would restrict all access to the specified site default language.

enter image description here

Side note if I attempt to delete a specific translation it deletes all translations. If I manually enter this path

/taxonomy/term/{taxonomy_term_id}/translations/edit/{language}

I get an access denied page. I shouldn't ever get an access denied page because I'm an admin with all permissions enabled. I do believe this path should exist because looking at the routes associated with the taxonomy term entity does contain that path. Here is some of the content of the entity info produced by devel.

[links:protected] => Array
    (
        [canonical] => /taxonomy/term/{taxonomy_term}
        [delete-form] => /taxonomy/term/{taxonomy_term}/delete
        [edit-form] => /taxonomy/term/{taxonomy_term}/edit
        [create] => /taxonomy/term
        [devel-load] => /devel/taxonomy_term/{taxonomy_term}
        [devel-render] => /devel/taxonomy_term/{taxonomy_term}/render
        [devel-definition] => /devel/taxonomy_term/{taxonomy_term}/definition
        [token-devel] => /taxonomy/term/{taxonomy_term}/devel/token
        [drupal:content-translation-overview] => /taxonomy/term/{taxonomy_term}/translations
        [drupal:content-translation-add] => /taxonomy/term/{taxonomy_term}/translations/add/{source}/{target}
        [drupal:content-translation-edit] => /taxonomy/term/{taxonomy_term}/translations/edit/{language}
        [drupal:content-translation-delete] => /taxonomy/term/{taxonomy_term}/translations/delete/{language}
    )

Why can't I access the edit forms for the translations that don't match the users set site language? How can I fix this?

  • 1
    This is probably about how you've configured language detection. Did you change the default settings? – 4k4 May 1 '18 at 16:42
  • I Have these enabled: Selected language, User. – Robert Maccabeus Bryan May 1 '18 at 16:54
  • I think you need to add either URL (preferrable) or Session with a higher priority. – 4k4 May 1 '18 at 17:56
  • I attempted that. No luck. To be clear (in the first image with the list of languages and the edit button) the edit buttons all have the same url. So I am not sure how it would know which translation to fetch with no extra information. Also the Entity Info suggests it should be '/taxonomy/term/{taxonomy_term}/translations/edit/{language}'. Which it is not. – Robert Maccabeus Bryan May 1 '18 at 19:30
  • Sure this works, if you have URL detection the edit button will point to the language specific prefix. Concerning the workflow of content translation, not all things work like they should, there are still some open issues. So it is not necessarily your fault. You have to play around with language detection for non standard language settings. – 4k4 May 1 '18 at 20:44
0

Just check "Content language" under "Content language detection".

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.