Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-26751

Value of fields not flagged as Translatable can be updated

    Details

      Description

      The behavior of non-translatable fields in eZ Platform differs from what is described in the reference documentation (https://doc.ez.no/display/DEVELOPER/Internationalization) which says:

      "When a Field is not flagged as Translatable, its value will be copied from the initial/main translation when a new language version is created. This copied value cannot be modified."

      Steps to reproduce:

      1. Prepare a test installation, clean;
      2. On the admin interface, go to Admin Panel / Languages, and create a new language (created fre-FR);
      3. Edit app/config/ezplatform.yml and add the new language:

      ezpublish:
          ...
          system:
              ...
              site:
                  languages:
                      - eng-GB
                      - fre-FR
      

      4. In the Content structure section, create a new article (used eng-GB), fill in all require fields, and check the "Enable comments" checkbox, which is a non-translatable field. Publish;
      5. Add a new translation to this article (used fre-FR). Ensure it is based on the eng-GB translation by checking the "Base this translation on an existing translation" checkbox;

      • Expected behavior: when creating the new translation, the field "Enable comments" should be checked and the value should not be modifiable.
      • Actual behavior: the field "Enable comments" is checked, which is correct, but it can be modified, which is wrong.
      1. Notice.svg
        0.7 kB
        Supriya Bhargava
      1. 2_Translatable_filledIn.png
        586 kB
      2. Disabled_Checkbox.png
        117 kB

        Issue Links

          Activity

          Hide
          Inaki Juaniz-Velilla added a comment - - edited

          Uploaded image "2_Translatable_filledIn.png showing "Almighty" Content Type when the user is trying to create a new French translation from the primary one, and including in this wireframe all field types possible showing a not translatable behavior (disabled - opacity 30%)

          Show
          Inaki Juaniz-Velilla added a comment - - edited Uploaded image "2_Translatable_filledIn.png showing "Almighty" Content Type when the user is trying to create a new French translation from the primary one, and including in this wireframe all field types possible showing a not translatable behavior (disabled - opacity 30%)
          Show
          Yannick Roger (Inactive) added a comment - - edited PR on 1.7: https://github.com/ezsystems/PlatformUIBundle/pull/788/
          Hide
          Eduardo Fernandes (Inactive) added a comment - - edited

          [~yannick.roger@ez.no],

          There are two issues with this pull request, one is a suggestion, other is a bug:

          Suggestion

          There's something that I consider very confusing in this patch from the user perspective.

          When I create new content, the untranslatable fields have the following message:

          This is not a translatable field and cannot be modified.

          The user is trying to create new content and receives a lot of message lines – since that could be multiple attributes – about things he might even be trying to do (since he might not even want translations for that content).
          So, why tell the user he can't translate if he is not trying to do that?

          I think that message could make sense if the user was editing content, to explain why he can't change it.
          But at creation time, specially because lots of editors won't have permissions to create or change classes, I wonder if that message makes sense.

          Bug

          As you suggested, in my tests, I created different content types with tree attributes of the same type:

          • One with the field required and translatable
          • One with the field not required and translatable
          • One with the field not required and not translatable

          The ""This is not a translatable field and cannot be modified" message is being displayed in all attributes, translatable or not.

          Show
          Eduardo Fernandes (Inactive) added a comment - - edited [~yannick.roger@ez.no] , There are two issues with this pull request, one is a suggestion, other is a bug: Suggestion There's something that I consider very confusing in this patch from the user perspective. When I create new content, the untranslatable fields have the following message: This is not a translatable field and cannot be modified. The user is trying to create new content and receives a lot of message lines – since that could be multiple attributes – about things he might even be trying to do (since he might not even want translations for that content). So, why tell the user he can't translate if he is not trying to do that? I think that message could make sense if the user was editing content, to explain why he can't change it. But at creation time, specially because lots of editors won't have permissions to create or change classes, I wonder if that message makes sense. Bug As you suggested, in my tests, I created different content types with tree attributes of the same type: One with the field required and translatable One with the field not required and translatable One with the field not required and not translatable The "" This is not a translatable field and cannot be modified " message is being displayed in all attributes, translatable or not.
          Hide
          Yannick Roger (Inactive) added a comment -

          Could you ask some else at QA to have a look because I can not reproduce the behavior (suggestion and bug) that you are experiencing. Just to make sure if there is something missing on one of our setups.

          Show
          Yannick Roger (Inactive) added a comment - Could you ask some else at QA to have a look because I can not reproduce the behavior (suggestion and bug) that you are experiencing. Just to make sure if there is something missing on one of our setups.
          Hide
          Yannick Roger (Inactive) added a comment -

          ezkeyword should be a low hanging fruit. So I will at least fix that one.

          For the rest, I am ok with follow ups.

          Show
          Yannick Roger (Inactive) added a comment - ezkeyword should be a low hanging fruit. So I will at least fix that one. For the rest, I am ok with follow ups.
          Hide
          Yannick Roger (Inactive) added a comment -

          Paulo Nunes I added a commit to add the forgotten keyword message (very small codeprint on the keyword template). Good catch guys.

          For the rest of the stuff, let's do follow ups.

          Please have a final look.

          Show
          Yannick Roger (Inactive) added a comment - Paulo Nunes I added a commit to add the forgotten keyword message (very small codeprint on the keyword template). Good catch guys. For the rest of the stuff, let's do follow ups. Please have a final look.
          Hide
          Sylvain Guittard added a comment -

          (1) - It wasn't possible to test it with ezpage and ezstarrating

          ezpage: I don't see why someone will configure this field as not translatable. ezstarrating is not implemented yet, so we don't have to test this fieldtype.

          Show
          Sylvain Guittard added a comment - (1) - It wasn't possible to test it with ezpage and ezstarrating ezpage: I don't see why someone will configure this field as not translatable. ezstarrating is not implemented yet, so we don't have to test this fieldtype.
          Hide
          Eduardo Fernandes (Inactive) added a comment -

          Issue created:

          • EZP-27102 - Mandatory non translatable fields will prevent translations if the translated content is not based on the original language
          Show
          Eduardo Fernandes (Inactive) added a comment - Issue created : EZP-27102 - Mandatory non translatable fields will prevent translations if the translated content is not based on the original language
          Show
          Yannick Roger (Inactive) added a comment - Fixed in 1.7, 1.8 and master: https://github.com/ezsystems/PlatformUIBundle/commit/fbfa46f12b87769792133f63276ccd15a18bb0bc

            People

            • Assignee:
              Unassigned
              Reporter:
              Nuno Oliveira (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: