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

webdav breaks listing deeper than 1 folder of content

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Medium Medium
    • None
    • 4.0.0alpha1, 4.0.0trunk
    • Legacy > WebDAV
    • None

    Description

      in function ezwebdavcontentserver->fetchnodeinfo($node), the href attibute emitted for a node wich is deeper than 1 level in the content tree is broken:
      it is built by using $node->urlAlias, appended to $_SERVER('SCRIPT_URL')

      script_url = http://my.test.server/siteaccess/Content/toplevelfolder/
      url_alias = toplevelfolder/secondlevelobj

      result:

      http://my.test.server/siteaccess/Content/toplevelfolder/toplevelfolder/secondlevelobj

      (dirty) fix: in fetchnodeinfo: replace

      $scriptURL = $_SERVER["SCRIPT_URL"];
      if ( strlen( $scriptURL ) > 0 and $scriptURL[ strlen( $scriptURL ) - 1 ] != "/" )
      $scriptURL .= "/";

      with

      $scriptURL = $_SERVER["SCRIPT_URL"];
      if ( strlen( $scriptURL ) > 0)
      {
      // dirty hack: find dav 'virtual root' of content
      if (($pos = strpos($scriptURL, '/Content')) !== false)

      { $scriptURL = substr($_SERVER["SCRIPT_URL"], 0, $pos + 8); }

      else if (($pos = strpos($scriptURL, '/Media')) !== false)

      { /// @todo: test with media folder $scriptURL = substr($_SERVER["SCRIPT_URL"], 0, $pos + 6); }

      if ($scriptURL[ strlen( $scriptURL ) - 1 ] != "/" )
      $scriptURL .= "/";
      }

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            72f8acac-185f-4a54-9470-a7473f50daab@accounts.ibexa.co Gaetano Giunta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: