Bug #75998
closedbe user and group "limit to language" property not saved when choosing default only
100%
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)
Updated by Joris Willems over 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.
Updated by Joris Willems over 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.
Updated by Wouter Wolters over 8 years ago
- Status changed from New to Accepted
- Is Regression changed from No to Yes
Seems to happen since: https://review.typo3.org/#/c/46535/ (https://forge.typo3.org/issues/73182)
Updated by Markus Klein over 8 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
Updated by Markus Klein over 8 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.
Updated by Markus Klein over 8 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.
Updated by Markus Klein over 8 years ago
- Sprint Focus set to Stabilization Sprint
Updated by Markus Mächler over 8 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.
Updated by Gerrit Code Review over 8 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
Updated by Gerrit Code Review over 8 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
Updated by Markus Mächler over 8 years ago
@markus klein, @susanne moog
since you didn't like my working solution, could you propose a different approach for fixing the problem?
Updated by Gerrit Code Review over 8 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
Updated by Gerrit Code Review over 8 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
Updated by Gerrit Code Review over 8 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
Updated by Gerrit Code Review over 8 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
Updated by Gerrit Code Review over 8 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
Updated by Gerrit Code Review over 8 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
Updated by Gerrit Code Review over 8 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
Updated by Gerrit Code Review over 8 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
Updated by Anonymous over 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c220019b262ec2fffe5788e60940443e47e9343f.