Reviewed & tested by the community
Project:
Protected Pages
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2019 at 10:56 UTC
Updated:
10 Mar 2025 at 11:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
deaom commentedAnd the patch.
Comment #3
drup16 commentedThis was a roadblock for us to enable View Pages with Ajax enabled while placing Facet Blocks through the
/admin/structure/block.After applying the patch the issue was resolved on all our pages that had facets.
Comment #4
chris matthews commentedComment #5
oksana-c commentedThe issue described by @DeaOm may have originated from a different module, potentially Views or Facets.
I attempted to reproduce this issue with Core 8.8.5, Search API 8.x-1.16, Facets 8.x-1.4 in Ajax enabled search views to no avail.
Also, Core AliasManager which provides getAliasByPath() method has been refactored within the last 5 months, so this may also affect the issue you're experiencing.
If this is still relevant, please provide detailed steps to reproduce, specify used module versions and reopen the issue.
Comment #6
cilefen commentedThis could be related to #3052574: Facets with AJAX not working in most of situations and in fact what is happening is that with search facets, in ProtectedPagesSubscriber::checkProtectedPage(), $this->currentPath->getPath() can return a full URI, for example,
https://example.com/search?search=testing&f[0]=type:event&f[1]=type:scholar. You would normally expect/searchto be returned. When the full URI gets passed to AliasManager::getAliasByPath() we get the exception.As mentioned in #5 this is probably not the fault of this module but rather is getPath() returning wrong data.
It is interesting that the return type comment for getPath is "Returns the path, without leading slashes", but actually does return a leading slash when working normally, which is good, because getAliasByPath obviously requires a leading slash.
Comment #7
cilefen commentedBy passing the request object to getAliasByPath we can get an accurate result. This will require scrutiny to be sure it doesn't break this access control method.
Comment #8
nickdickinsonwildeCan confirm this does resolve the issue.
Comment #9
anybodyAny plans how to proceed here? Any active maintainer for this project?
Comment #10
mrpauldriver commentedI am seeing something similar. Could somebody confirm with me if this is the same bug.
The full text of my error message can be found in this pastebin
Comment #11
unsettlingtrendI was getting the 500 error and #7 patch worked for me.
Comment #12
mrwhittaker commentedWas getting errors trying to apply 3049350-7.patch to protected_pages version 1.7.0 rerolled the patch.
Comment #13
droprocker commentedWhen installing patch in #12, the validation for entered path aliases fails on /admin/config/system/protected_pages/add. Input field for paths only allows /node/123 format.