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

Fetch doesn't deliver proper result when usign language limitation and parent and child have a different language

    XMLWordPrintable

Details

    Description

      Here is some multilanguage issue with a tree fetch

              $node_id = 2;
              $treeParameters = array( 'OnlyTranslated' => true,
                                       'Language' => 'ger-DE',
                                       'IgnoreVisibility' => true,
                                       'MainNodeOnly' => true );
      eZContentObjectTreeNode::subTreeByNodeID( $treeParameters, $node_id );
      

      The following code delivers no result if the following is true:
      consider we use a couple of languages...
      node 2 is only translated into eng-GB
      node 2 has many children in ger-DE

      Now I want all children of node 2 but is doesn`t work... I get an empty result... if I add the translation 'ger-DE' to node 2 it will all work fine.

      the problematic failure happens in function
      createPathConditionAndNotEqParentSQLStrings
      when
      $node = eZContentObjectTreeNode::fetch( $nodeID, false, false ); is called.
      The problem is the earlier call to eZContentLanguage::setPrioritizedLanguages( $language ); in subTreeByNodeID

      Patch attached.

      Attachments

        Activity

          People

            gl gl
            gl gl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: