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

Switching siteaccess does not update prioritized languages

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 5.3.3, 2014.11, 5.4.0-beta1
    • 2014.07, 5.3.2, 5.4-dev
    • Language
    • None
    • 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

        Activity

          People

            Unassigned Unassigned
            3427b0be-ab4e-4614-8af1-1719f7f23944@accounts.ibexa.co 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