be user and group "limit to language" property not saved when choosing default only
DataHandler aka TCEmain
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)
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.
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.
- Status changed from New to Accepted
- Is Regression changed from No to Yes
- 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
- 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.
- Priority changed from Should have to Must have
- Complexity set to hard
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
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.
- Sprint Focus set to Stabilization Sprint
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.
- Status changed from Accepted to Under Review
@markus klein, @susanne moog
since you didn't like my working solution, could you propose a different approach for fixing the problem?
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom