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

Exception instead of 404 when trying to access a file stored with a non default vardir

    XMLWordPrintable

    Details

      Description

      If you change the VarDir setting, create a file content and try to access it directly you will get an unhanded exception (see attached stack trace) instead a 404.
      Argument '$id' is invalid: Prefix images not found in original/video/4bdd7ff
      b1324dc94c291c066e3fc797c.mov
      *500 Internal Server Error ­ InvalidArgumentException*

      If you use the default VarDir, you will get a 404 page.

      Steps to reproduce
      • Change the VarDir settings in you legacy "override/site.ini.append.php" and your "config/ezpublish.yml" to "var/storage".
        VarDir=var/storage
      • Go to your backend, create a file content with a video file. Let's say, "my_test.mov".
      • Confirm the file was created in the correct VarDir:
        "./ezpublish_legacy/var/storage/storage/original/application/9f88d3cbec3bbfa4f5757e46d7bd1894.mkv"
      • Try to access it with the API or just open the link in your browser:
        http://my-site.comt/var/storage/storage/original/application/9f88d3cbec3bbfa4f5757e46d7bd1894.mkv
      • Confirm you will get the exception.

      Note: If you change the VarDir to the default "VarDir=var/ezdemo_site" value, and try to open the URL, you will get a handled 404:
      http://my-site.comt/var/storage/storage/original/application/9f88d3cbec3bbfa4f5757e46d7bd1894.mkv

        Attachments

        1. no_404.pdf
          243 kB
        2. stacktrace.txt
          5 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              eduardo.fernandes-obsolete@ez.no Eduardo Fernandes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 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 - 2 weeks, 3 hours, 45 minutes
                  2w 3h 45m