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

Bug with Url Aliases using the PHP API with different languages

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Medium Medium
    • None
    • 4.4.0
    • Misc
    • None
    • eZ Publish Entreprise 4.4

    Description

      Hello,

      There's a bug in the eZPublish PHP API, with different languages using the PHP API.

      I want to use the PHP API eZContentObjectTreeNode, to treat the object before/after the publication.

      When i'm connected to the Back Office in a language (let's say English), and i edited a node in another language (French for exemple), i tried to access to the url alias of the node using the API below :

      /* Access to the node in the required language (Fre) */
      $ContentNode = eZContentObjectTreeNode :: fetch( $ContentNodeID , $ContentLanguage );
      
      $ContentNodeURL = $ContentNode->urlAlias();
      or
      $ContentNodeURL = $ContentNode->attribute('url_alias');
      

      I noticed that the url returned by the function is the alias for the current back office language that mean that for the French node i edited, i got an english url alias.

      Exemple:

        • Let's say we are connected into the English Back Office

      We edit the object that have :

      When i edited the french object, the API returns me "http://localhost/eng/french_node" with the correct siteaccess but the incorrect url alias.

      Steps to reproduce

      1) Connect to the Back office with a language (English)
      2) Edit a node (object) in another language (French)
      3) Use PHP API eZContentObjectTreeNode to return the url_alias of the node

      Attachments

        Activity

          People

            jv@ez.no jv@ez.no
            rc@ez.no rc@ez.no
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: