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

Switching siteaccess does not update prioritized languages

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2014.07, 5.3.2, 5.4-dev
    • Fix Version/s: 5.3.3, 2014.11, 5.4.0-beta1
    • Component/s: Language
    • Labels:
      None
    • Environment:

      Any

      Description

      If you need to loop through several siteaccess to access content, the prioritized language list is not updated.

      For example, this code will always return the "UK" name for every siteaccess.

      $siteAccesses = array( 'uk', 'us', 'de' );
      foreach( $siteAccesses as $siteAccessName )
      {
          $cli->output( $siteAccessName );
      
          $access = array( 'name' => $siteAccessName, 'type' => eZSiteAccess::TYPE_STATIC );
          eZSiteAccess::load( $access );
          
          $node = eZFunctionHandler::execute( 'content', 'node', array( 'node_id' => 60 ) );
          $cli->output( $node->attribute( 'object' )->attribute( 'name' ) );
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              peterkeung Peter Keung
              Votes:
              0 Vote for this issue
              Watchers:
              5 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 - 4 hours
                  4h