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

Impossible to translate content without the "always available" flag

    Details

      Description

      It's impossible to translate content without the "always available" flag.

      Steps to reproduce (in a Platform setup having at least 2 properly configured languages):

      1. Create a content type where "Default content availability" is unchecked
      2. Create a content of this type in a language
      3. Translate this content in a second language

      You'll get an error notification saying that the content cannot be loaded in the second language.

        Issue Links

          Activity

          Hide
          Mateusz Hyndle (Inactive) added a comment - - edited

          I have investigated it a bit more and it showed up that key is "Default object availability". If content type has its flag "Default object availability" set to "Available" and we are creating such content with legacy BO then it can be translated with PlatformUI. If the content type has that flag set to "Not available" and the content is created with legacy BO, then we are unable to create translation for it with PlatformUI. Weird is that it is only the case for contents created with legacy BO - contents created with PlatformUI can be translated no matter if default object is set to be availble or not.
          So I guess that there may be problem with storing content with PlatformUI which ignores somehow "Default object availibility" setting or getting content created with legacy BO is not working as expected. ping [~damien.pobel@ez.no]

          Show
          Mateusz Hyndle (Inactive) added a comment - - edited I have investigated it a bit more and it showed up that key is "Default object availability". If content type has its flag "Default object availability" set to "Available" and we are creating such content with legacy BO then it can be translated with PlatformUI. If the content type has that flag set to "Not available" and the content is created with legacy BO, then we are unable to create translation for it with PlatformUI. Weird is that it is only the case for contents created with legacy BO - contents created with PlatformUI can be translated no matter if default object is set to be availble or not. So I guess that there may be problem with storing content with PlatformUI which ignores somehow "Default object availibility" setting or getting content created with legacy BO is not working as expected. ping [~damien.pobel@ez.no]
          Hide
          Damien Pobel (Inactive) added a comment -

          OK, actually we have 2 issues:

          1. no matter if the content type has the always available flag set or not, we always create content as always available because of: https://github.com/ezsystems/ez-js-rest-client/blob/master/src/structures/ContentCreateStruct.js#L29
          2. and indeed, the translation of a content without the always available flag is broken (and impossible to reproduce right now with PlatformUI alone because of the first issue).
          Show
          Damien Pobel (Inactive) added a comment - OK, actually we have 2 issues: no matter if the content type has the always available flag set or not, we always create content as always available because of: https://github.com/ezsystems/ez-js-rest-client/blob/master/src/structures/ContentCreateStruct.js#L29 and indeed, the translation of a content without the always available flag is broken (and impossible to reproduce right now with PlatformUI alone because of the first issue).
          Hide
          Damien Pobel (Inactive) added a comment -

          The first issue in handled in EZP-25091. As mentioned in the previous comment, after the fix for EZP-25091, this can easily be reproduced without the Legacy Bridge.

          PR: https://github.com/ezsystems/PlatformUIBundle/pull/432

          Show
          Damien Pobel (Inactive) added a comment - The first issue in handled in EZP-25091 . As mentioned in the previous comment, after the fix for EZP-25091 , this can easily be reproduced without the Legacy Bridge. PR: https://github.com/ezsystems/PlatformUIBundle/pull/432
          Show
          Damien Pobel (Inactive) added a comment - Merged in master in https://github.com/ezsystems/PlatformUIBundle/commit/aea50b7023a68cdd5da7a33398c78cf689753c5d
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for master.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for master.

            People

            • Assignee:
              Unassigned
              Reporter:
              Rui Silva (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour
                1d 1h