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

Option "Default content availability" on content types not working

    XMLWordPrintable

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            1815b76a-79ab-42f9-855b-3c3e8e57d0da@accounts.ibexa.co Franck Perrin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: