Bug #89672

Missing l10n_parent field permission breaks page translation process

Added by Peter Kraume 7 months ago. Updated 30 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2019-11-13
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If an editor has no write access to the l10n_parent field of pages, creating a page translation fails and ends up with a broken entry in the pages table which even admins can't access anymore.

How to reproduce:

  • create a website language record on page id=0
  • create site config for new language
  • create backend user group with these rights:
  • Module: Web>Page and Web>List
  • Tables (modify) => Page, Page Content
  • Page types => Standard
  • Allowed excludefields
  • Page => select all but l10n_parent
  • Page Content => select all
  • set DB Mount
  • grant access in module Access
  • create backend user and add user group from above
  • switch to user
  • try to make a new translation of a page

Result:

The throbber stays forever, nothing happens (see attached screencast).
If you try to translate the same page again, you get this error message:

Localization failed: there already are localizations (6) for language 1 of the "pages" record 4!

Even an admin user gets the same error message. The new page translation record isn't visible in the list module.
Only solution to fix such a broken page is to set the l10n_parent manually in the database.

Suggested solution:

Remove exclude option from pages TCA for l10n_parent field.
Or throw exception, if an editor has no access rights for l10n_parent and tries to translate a page.

l10n_parent.mov (1.05 MB) Peter Kraume, 2019-11-13 16:36


Related issues

Related to TYPO3 Core - Bug #40112: Show warning on translation by user without access to "l18n_parent" Closed 2012-08-24
Related to TYPO3 Core - Bug #90541: page can't be translated if pages:l10n_parent is not set for an editor Closed 2020-02-26
Related to TYPO3 Core - Bug #89369: Page translations faulty when editor has no permissions for "l10n_parent" Closed 2019-10-08

Associated revisions

Revision fe67d9a5 (diff)
Added by Oliver Bartsch 4 months ago

[BUGFIX] Remove exclude field for transOrigPointerFields

transOrigPointerFields can not longer be excluded as this leads
to inconsistent data stored in the database if a non-admin
user created a localization by not having the permission to edit
the transOrigPointerField.

Resolves: #89550
Resolves: #89672
Releases: master
Change-Id: Id718323783d37e6044781183052e3428ded9c89c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62632
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Tested-by: Benni Mack <>
Reviewed-by: Georg Ringer <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Gerrit Code Review 6 months ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62632

#2 Updated by Benni Mack 5 months ago

  • Related to Bug #40112: Show warning on translation by user without access to "l18n_parent" added

#3 Updated by Gerrit Code Review 4 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62632

#4 Updated by Gerrit Code Review 4 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62632

#5 Updated by Oliver Bartsch 4 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Georg Ringer 3 months ago

  • Related to Bug #90541: page can't be translated if pages:l10n_parent is not set for an editor added

#7 Updated by Georg Ringer 3 months ago

  • Related to Bug #89369: Page translations faulty when editor has no permissions for "l10n_parent" added

#8 Updated by Benni Mack 3 months ago

  • Status changed from Resolved to Closed

#9 Updated by Sybille Peters 3 months ago

It looks like this has been fixed in 10, but not in 9.

I would like to check if my site is affected by this (I am getting strange error messages when trying to delete a page tree with translated pages as admin with datahandler. This might be related).

creating a page translation fails and ends up with a broken entry in the pages table which even admins can't access anymore.

What does the broken entry look like? How can we search for these? Can we (safely) clean up these faulty translated pages?

#10 Updated by Sascha Egerer 30 days ago

Sybille Peters wrote:

It looks like this has been fixed in 10, but not in 9.

I would like to check if my site is affected by this (I am getting strange error messages when trying to delete a page tree with translated pages as admin with datahandler. This might be related).

creating a page translation fails and ends up with a broken entry in the pages table which even admins can't access anymore.

What does the broken entry look like? How can we search for these? Can we (safely) clean up these faulty translated pages?

I think

select * from pages where sys_language_uid > 0 and l10n_parent = 0 and deleted = 0
should help to find those broken translations.

Also available in: Atom PDF