Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-2240

Removing Landing Page translation removes all blocks from all translations

    XMLWordPrintable

Details

    • [2.3] Sprint 3

    Description

      Steps to reproduce:

      1. Configure at least two different languages on eZ Platform EE. For instance eng-GB and fre-FR.
      2. Create a Landing Page in eng-GB. Add some blocks and publish it.
      3. Add fre-FR translation. Add some blocks and publish it.
      4. Check both translations, each of them should be fine.
      5. Remove fre-FR translation.
      6. Check LandingPage.

      Result:
      All blocks from all translations will be removed after removing one translation.

      Expected result:
      Landing Page translation should be removed, but all other translations should stay untouched.

      Note from the customer:

      function loadPagesMappedToContent does not care about the $fieldIds argument that it received then it does not know what to do and remove all.

      This argument contains the field IDs of $contentId to be removed, which are all the attribute id related to the French version.

      That is it we just need to adapt `loadPagesMappedToContent` to use those ids.

          public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array $context)
          {
              // somehow get the translation information from `$fieldIds` then pass that to loadPagesMappedToContent
              // and filter the return of loadPagesMappedToContent to return ONLY the page related to the CORRECT translation / $fieldIds
              
              $pages = $this->gateway->loadPagesMappedToContent($versionInfo->contentInfo->id, $versionInfo->versionNo);
      
              foreach ($pages as $page) {
                  $this->removePage((int) $page['id']);
              }
          }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            kamil.madejski@ibexa.co Kamil Madejski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: