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.
Updated by Markus Klein over 8 years ago
- Category changed from Backend API to Backend User Interface
Updated by Gerrit Code Review over 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53418
Updated by Gerrit Code Review over 7 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53570
Updated by Frans Saris over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset bcb412920dffa1686247259f1db3043f6b23cacb.