Closed (fixed)
Project:
Translation Management Tool
Version:
8.x-1.x-dev
Component:
Source: Configuration
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2015 at 14:11 UTC
Updated:
7 Oct 2015 at 22:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
giancarlosotelo commentedThis was happening also with the validation tag. After clicking the button everything was empty and its just happening in Account settings.
I was trying to find the error and it seems its because a dot. Most of the name of the fields are 'name[translation]' and some of them have the string '][' that its replaced by '|'.
// The char sequence '][' confuses the form API so we need to replace it.Some of the config entities have an '.' inside like 'user.settings|anonymous[translation]' so this was breaking the translation. I am replacing the '.' with a '|' in the form.
With this the validation tag is working fine but after saving the job item, it is still empty. The translation is saved because while I was debugging I could see that the last value in the field was there so is just not showed.
Maybe I should change also some validation with '|' in other functions (I tried but didn't work). I need some feedback.
EDIT: without the replacement of '][' neither of the translations are saved.
Comment #7
miro_dietikerStrange problem and needs discussion.
I think we can not convert both ][ and . to |.
As a result, we can no more identify the original string reliably. This is needed to write back the data after accept.
Unsure if test coverage is enough. But we need to be very careful with this.
Comment #8
berdir(Wrote but failed to post this yesterday, so partially overlaps with Miro)
Well, you always have to convert it back. Which will show you the problem with your approach, you no longer know which one it was. so if we have to escape something, we need to do it so we can undo it.
But I'm confused, I don't see why user.settings is different from system.site, for example.
This is not a UI problem, so we shouldn't add a test in the UI. Instead, add one to ConfigSourceUnitTest, that should be much easier to debug.
Comment #9
giancarlosotelo commentedI added a unit test that its failing despite its the same as
system.sitetest.To make the test pass,
['user.settings']its needed in the array, because the config entity 'entity.user.admin_form' have one more level in the nested array.Comment #10
giancarlosotelo commentedOk after discussion with @berdir, WebTests are necessary and we have to do the mapping in the ConfigSource. I also 'uncommented' a unit test because the core issue was fixed.
Tests are green locally but the module is broken right now so if fails its not related .
Comment #12
giancarlosotelo commentedAdded one '_' more to avoid errors with $keys with '_' and rebase.
Comment #17
berdirGreat, committed.