Bug #76440
closedError while create translation of Page "ERROR: Language was not allowed."
100%
Description
Hello,
i found a significant bug, which comes up if you want to translate a page with a backend user which doesn't have access to all languages. There has to be more translated pages than normal pages. I found out that, if you create a translation, you get this error because TYPO3 checks the rights of the user against the pages_language_overlay table and not the pages table, which would be correct.
How to reproduce the error:
You have a website with 4 pages in 3 languages (de,en,it). Every page has a translation in every language (pages table uid 1-4, pages_overlay_table uid 1-8).
page/pages_language_overlay UIDs:
| de | en | it | PageA | 1 | 1 | 5 | PageB | 2 | 2 | 6 | PageC | 3 | 3 | 7 | PageD | 4 | 4 | 8 |
In the case above you need a backend user with access only to 'en' translation. First you create a new page (uid=5). Now if you want to create a translation for 'en' TYPO3 checks if you have access to everything you want to translate. The problem is, it checks if you have access to pages_language_overlay with uid=5. In my usecase i got an error because i don't have access to the images in content of pages_language_overlay with uid=5, which is the 'it' translation. I don't have access to this translation so i got the error: "ERROR: Language was not allowed."
I didn't found a proper solution for this issue. If i change the "onchange" javascript event of the select in Backend from pages_language_overlay to pages, the check of the access seems to work right. But the whole formDataProvider isn't able to prefill the "sys_language_uid" correct.
Maybe someone could take a look and maybe sees how to fix it correct.