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

Hidden state on Locations is not taken into account in ViewController

    Details

      Description

      Ref this post on share.ez.no.

      When hiding a location in admin interface, visibility is not reflected on the frontend in the built-in ViewController. Hence, accessing directly to the location either with its system URI or URLAlias will still display the hidden content.

      It should throw a NotFoundException.

      Important note

      API wise, Visibility flag is not permission based and is not meant to restrict access. It's more a filter.
      To restrict access to a content, you must use sections and/or object states.

        Issue Links

          Activity

          Show
          Jérôme Vieilledent (Inactive) added a comment - PR: https://github.com/ezsystems/ezpublish-kernel/pull/732
          Show
          Jérôme Vieilledent (Inactive) added a comment - - edited Fixed in master: https://github.com/ezsystems/ezpublish-kernel/commit/64f84884544e75c9a8d89f27d7310e82eb1dfda8 https://github.com/ezsystems/ezpublish-kernel/commit/fabce3f544219222832b1172bfd651dfa30e9333
          Show
          Jérôme Vieilledent (Inactive) added a comment - Doc updated : https://doc.ez.no/eZ-Publish/User-manual/5.x/Daily-tasks/Hiding-and-revealing-content https://confluence.ez.no/display/EZP/Content+view
          Hide
          Gaetano Giunta (Inactive) added a comment -

          I tested this on a clean ezp 52 + demobundle:

          • hide a folder
          • access it in frontend

          all you get is:

          "TwigBundle:Exception:error500.html.twigFatal error: The web server did not finish its request

          Debug information can be found in the log files normally placed in var/log/* or by enabling 'DebugOutput' in site.ini"

          I would have expected a nice 404 error page.

          If I just type a random url, I do get it, as it is handled by legacy routing, which has "acceptable" error pages...

          Show
          Gaetano Giunta (Inactive) added a comment - I tested this on a clean ezp 52 + demobundle: hide a folder access it in frontend all you get is: "TwigBundle:Exception:error500.html.twigFatal error: The web server did not finish its request Debug information can be found in the log files normally placed in var/log/* or by enabling 'DebugOutput' in site.ini" I would have expected a nice 404 error page. If I just type a random url, I do get it, as it is handled by legacy routing, which has "acceptable" error pages...
          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          Gaetano Giunta: This is a different story... Nice error pages are planned for DemoBundle, but definitely not part of this.

          Show
          Jérôme Vieilledent (Inactive) added a comment - Gaetano Giunta : This is a different story... Nice error pages are planned for DemoBundle, but definitely not part of this.
          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          Gaetano Giunta: With this change, the ViewController will now throw a 404, not a 500. However, it's true that the exception will be caught in the last catch block, which is not what we want.

          Show
          Jérôme Vieilledent (Inactive) added a comment - Gaetano Giunta : With this change, the ViewController will now throw a 404, not a 500. However, it's true that the exception will be caught in the last catch block, which is not what we want.
          Hide
          Jérôme Vieilledent (Inactive) added a comment -
          Show
          Jérôme Vieilledent (Inactive) added a comment - Additional commit on master: https://github.com/ezsystems/ezpublish-kernel/commit/fabce3f544219222832b1172bfd651dfa30e9333 Previous comment updated
          Hide
          Joao Pingo (Inactive) added a comment -

          QA Approved

          Show
          Joao Pingo (Inactive) added a comment - QA Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Jérôme Vieilledent (Inactive)
            • Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours
                1d 2h