Project

General

Profile

Actions

Bug #75998

closed

be user and group "limit to language" property not saved when choosing default only

Added by Joris Willems almost 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
Start date:
2016-05-01
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
hard
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

version 8.0.1
When I open a backend user or group and set the default language (id 0) as only language the modification is not stored. If I select German (id 1) the language is stored. The data (0) is somehow interpreted as NULL.
I am using MariaDB (if this changes anything)


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #73182: Import of localized content fails, content looses language idClosed2016-02-08

Actions
Has duplicate TYPO3 Core - Bug #77738: Standard language value not saved for language selection fieldClosed2016-09-01

Actions
Actions #1

Updated by Joris Willems almost 8 years ago

As a workaround I set the language to German only and then:
update be_groups set allowed_languages="0" where allowed_languages = "1";

This is ofcourse less than ideal because you lose the property with every change.

Actions #2

Updated by Joris Willems almost 8 years ago

PHPv7.0.5

Actions #3

Updated by Joris Willems almost 8 years ago

I have typo3 7.6.6 on the same server environment and it does not have this issue so it's a regression.

Can someone try if it is reproducible please? I think it is but I don't have the means to up another 8.0.1.

Actions #4

Updated by Wouter Wolters almost 8 years ago

  • Status changed from New to Accepted
  • Is Regression changed from No to Yes
Actions #5

Updated by Markus Klein over 7 years ago

  • Category set to DataHandler aka TCEmain
  • Target version set to next-patchlevel
  • TYPO3 Version changed from 8 to 7
  • PHP Version set to 7.0
Actions #6

Updated by Markus Klein over 7 years ago

  • Is Regression changed from Yes to No

My investigation shows that #73182 is not the culprit but actually just reveals again the issues of DataHandler when it comes to handling values with no, empty string or 0 content.

Actions #7

Updated by Markus Klein over 7 years ago

  • Priority changed from Should have to Must have
  • Complexity set to hard

Problem analysis

Having a select fields with a special=languages definition (or maybe even foreign_table) will NEVER persist the selected value if it is zero.
That is due to the functioning of the RelationHandler, which denies such values in \TYPO3\CMS\Core\Database\RelationHandler::readList with the condition if (((string)$theID != '' && $theID). This code is called via \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_group_select_processDBdata

Examples in Core, which are affected, are the "allowed_languages" field for be_users/be_groups and all sys_language_uid fields of content elements.
The only reason it works for CEs is, that the default value for the column is specified to be '0', which is always taken.
Unfortunately it is impossible to define such a default value for "allowed_languages", so things fail here.

Actions #8

Updated by Markus Klein over 7 years ago

  • Sprint Focus set to Stabilization Sprint
Actions #9

Updated by Markus Mächler over 7 years ago

hey

we noted that this bug also affects saving any language plus the default language, which always results in the default language not being persisted / selected.

Actions #10

Updated by Gerrit Code Review over 7 years ago

  • Status changed from Accepted 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/49295

Actions #11

Updated by Gerrit Code Review over 7 years ago

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/49295

Actions #12

Updated by Markus Mächler over 7 years ago

@markus klein, @susanne moog
since you didn't like my working solution, could you propose a different approach for fixing the problem?

Actions #13

Updated by Gerrit Code Review over 7 years 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/49295

Actions #14

Updated by Gerrit Code Review over 7 years 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/49295

Actions #15

Updated by Gerrit Code Review over 7 years ago

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

Actions #16

Updated by Gerrit Code Review over 7 years ago

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

Actions #17

Updated by Gerrit Code Review over 7 years ago

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

Actions #18

Updated by Gerrit Code Review over 7 years ago

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

Actions #19

Updated by Gerrit Code Review over 7 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49485

Actions #20

Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49485

Actions #21

Updated by Anonymous over 7 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF