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

Option "Default content availability" on content types not working

    Details

      Description

      When using the admin forms, the Default content Availability on content types is not translated to the content's language mask.

      The data returned by the form has 'alwaysAvailable' => NULL despite the content type having 'defaultAlwaysAvailable' => true. This can be verified by inspecting the $form->getData() in the class \EzSystems\RepositoryForms\Content\View\Builder\ContentCreateViewBuilder at line 86.

      And according to the class \eZ\Publish\Core\Repository\ContentService we have:

      if ($contentCreateStruct->alwaysAvailable === null) {
          $contentCreateStruct->alwaysAvailable = false;
      }
      

      And there you have it, the contant availability is always false.

      To reproduce this issue:

      • Make sure you have a content type with the option "Default content Availability" enabled.
      • Create an object of this type in English
      • Check the table ezcontentobject for your content

      Expected result :

      initial_language_id language_mask
      2 3

      Actual result:

      initial_language_id language_mask
      2 2

        Issue Links

          Activity

          Show
          Dawid Parafiński added a comment - https://github.com/ezsystems/ezpublish-kernel/pull/2462
          Hide
          Amaury Vallier added a comment -

          I can confirm the problem, I just tested and have the exact same!

          Show
          Amaury Vallier added a comment - I can confirm the problem, I just tested and have the exact same!
          Hide
          Michał Szołtysek added a comment -

          Retest successful on eZ Platform v2.2.3 with diff.

          Show
          Michał Szołtysek added a comment - Retest successful on eZ Platform v2.2.3 with diff.
          Show
          Michał Szołtysek added a comment - Merged to 6.7: https://github.com/ezsystems/ezpublish-kernel/commit/e2de624f7d5067fb3304036d7f88b10aff2d01e4

            People

            • Assignee:
              Unassigned
              Reporter:
              Franck Perrin
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: